MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlRegCopyRange

Function xmlRegCopyRange

ThirdParty/libxml2/vtklibxml2/xmlregexp.c:748–768  ·  view source on GitHub ↗

* xmlRegCopyRange: * @range: the regexp range * * Copy a regexp range * * Returns the new copy or NULL in case of error. */

Source from the content-addressed store, hash-verified

746 * Returns the new copy or NULL in case of error.
747 */
748static xmlRegRangePtr
749xmlRegCopyRange(xmlRegParserCtxtPtr ctxt, xmlRegRangePtr range) {
750 xmlRegRangePtr ret;
751
752 if (range == NULL)
753 return(NULL);
754
755 ret = xmlRegNewRange(ctxt, range->neg, range->type, range->start,
756 range->end);
757 if (ret == NULL)
758 return(NULL);
759 if (range->blockName != NULL) {
760 ret->blockName = xmlStrdup(range->blockName);
761 if (ret->blockName == NULL) {
762 xmlRegexpErrMemory(ctxt);
763 xmlRegFreeRange(ret);
764 return(NULL);
765 }
766 }
767 return(ret);
768}
769
770/**
771 * xmlRegNewAtom:

Callers 1

xmlRegCopyAtomFunction · 0.85

Calls 4

xmlRegNewRangeFunction · 0.85
xmlStrdupFunction · 0.85
xmlRegexpErrMemoryFunction · 0.85
xmlRegFreeRangeFunction · 0.85

Tested by

no test coverage detected