Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: third_party/libxslt/libxslt/extensions.c

Issue 1848793005: Roll libxslt to 891681e3e948f31732229f53cb6db7215f740fc7 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libxslt/libxslt/attributes.c ('k') | third_party/libxslt/libxslt/functions.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * extensions.c: Implemetation of the extensions support 2 * extensions.c: Implemetation of the extensions support
3 * 3 *
4 * Reference: 4 * Reference:
5 * http://www.w3.org/TR/1999/REC-xslt-19991116 5 * http://www.w3.org/TR/1999/REC-xslt-19991116
6 * 6 *
7 * See Copyright for the status of this software. 7 * See Copyright for the status of this software.
8 * 8 *
9 * daniel@veillard.com 9 * daniel@veillard.com
10 */ 10 */
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 * 1615 *
1616 * Registers an extension module element. 1616 * Registers an extension module element.
1617 * 1617 *
1618 * Returns 0 if successful, -1 in case of error. 1618 * Returns 0 if successful, -1 in case of error.
1619 */ 1619 */
1620 int 1620 int
1621 xsltRegisterExtModuleElement(const xmlChar * name, const xmlChar * URI, 1621 xsltRegisterExtModuleElement(const xmlChar * name, const xmlChar * URI,
1622 xsltPreComputeFunction precomp, 1622 xsltPreComputeFunction precomp,
1623 xsltTransformFunction transform) 1623 xsltTransformFunction transform)
1624 { 1624 {
1625 int ret; 1625 int ret = 0;
1626 1626
1627 xsltExtElementPtr ext; 1627 xsltExtElementPtr ext;
1628 1628
1629 if ((name == NULL) || (URI == NULL) || (transform == NULL)) 1629 if ((name == NULL) || (URI == NULL) || (transform == NULL))
1630 return (-1); 1630 return (-1);
1631 1631
1632 if (xsltElementsHash == NULL) 1632 if (xsltElementsHash == NULL)
1633 xsltElementsHash = xmlHashCreate(10); 1633 xsltElementsHash = xmlHashCreate(10);
1634 if (xsltElementsHash == NULL) 1634 if (xsltElementsHash == NULL)
1635 return (-1); 1635 return (-1);
1636 1636
1637 xmlMutexLock(xsltExtMutex); 1637 xmlMutexLock(xsltExtMutex);
1638 1638
1639 ext = xsltNewExtElement(precomp, transform); 1639 ext = xsltNewExtElement(precomp, transform);
1640 if (ext == NULL) { 1640 if (ext == NULL) {
1641 ret = -1; 1641 ret = -1;
1642 goto done; 1642 goto done;
1643 } 1643 }
1644 1644
1645 xmlHashUpdateEntry2(xsltElementsHash, name, URI, (void *) ext, 1645 xmlHashUpdateEntry2(xsltElementsHash, name, URI, (void *) ext,
1646 (xmlHashDeallocator) xsltFreeExtElement); 1646 (xmlHashDeallocator) xsltFreeExtElement);
1647 1647
1648 done: 1648 done:
1649 xmlMutexUnlock(xsltExtMutex); 1649 xmlMutexUnlock(xsltExtMutex);
1650 1650
1651 return (0); 1651 return (ret);
1652 } 1652 }
1653 1653
1654 /** 1654 /**
1655 * xsltExtElementLookup: 1655 * xsltExtElementLookup:
1656 * @ctxt: an XSLT process context 1656 * @ctxt: an XSLT process context
1657 * @name: the element name 1657 * @name: the element name
1658 * @URI: the element namespace URI 1658 * @URI: the element namespace URI
1659 * 1659 *
1660 * Looks up an extension element. @ctxt can be NULL to search only in 1660 * Looks up an extension element. @ctxt can be NULL to search only in
1661 * module elements. 1661 * module elements.
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 else { 2353 else {
2354 fprintf(output, "\nRegistered Extension Modules:\n"); 2354 fprintf(output, "\nRegistered Extension Modules:\n");
2355 xmlMutexLock(xsltExtMutex); 2355 xmlMutexLock(xsltExtMutex);
2356 xmlHashScanFull(xsltExtensionsHash, 2356 xmlHashScanFull(xsltExtensionsHash,
2357 (xmlHashScannerFull) 2357 (xmlHashScannerFull)
2358 xsltDebugDumpExtModulesCallback, output); 2358 xsltDebugDumpExtModulesCallback, output);
2359 xmlMutexUnlock(xsltExtMutex); 2359 xmlMutexUnlock(xsltExtMutex);
2360 } 2360 }
2361 2361
2362 } 2362 }
OLDNEW
« no previous file with comments | « third_party/libxslt/libxslt/attributes.c ('k') | third_party/libxslt/libxslt/functions.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698