swh:1:snp:7d9f1bc35e120776766db9334626062f837c20ad
Tip revision: 17ba60d446f6da77b1143f704f7e0af6839b1d9b authored by CRAN Team on 16 March 2021, 12:52:45 UTC
version 3.99-0.6
version 3.99-0.6
Tip revision: 17ba60d
NodeGC.h
#ifndef NODEGC_H
#define NODEGC_H
#if 1
/*
We use the address of a global variable as a marker/signature that
indicates we created the value of _private.
*/
extern int R_XML_MemoryMgrMarker;
extern int R_XML_NoMemoryMgmt;
#define R_MEMORY_MANAGER_MARKER R_XML_MemoryMgrMarker
#define IS_NOT_OUR_DOC_TO_TOUCH(doc) (doc->_private == NULL || (doc->_private && doc->_private == &R_XML_NoMemoryMgmt) || ((int*)doc->_private)[1] != R_MEMORY_MANAGER_MARKER)
#define IS_NOT_OUR_NODE_TO_TOUCH(node) ((node->_private == NULL) || (node->doc && node->doc->_private && node->doc->_private == &R_XML_NoMemoryMgmt) || ((int*)node->_private)[1] != R_MEMORY_MANAGER_MARKER)
#else
/* Not used. */
#define IS_NOT_OUR_DOC_TO_TOUCH(doc) (doc && doc->name && strcmp((doc)->name, " fake node libxslt") == 0)
#define IS_NOT_OUR_NODE_TO_TOUCH(node) (node && (node)->doc && IS_NOT_OUR_DOC_TO_TOUCH((node)->doc))
#endif
void decrementNodeRefCount(SEXP rnode);
void initDocRefCounter(xmlDocPtr doc);
void decrementNodeRefCount(SEXP rnode);
#endif