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

Side by Side Diff: third_party/libxml/src/testModule.c

Issue 2010803004: Roll libxml to bdec2183f34b37ee89ae1d330c6ad2bb4d76605f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update README.chromium Created 4 years, 7 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/libxml/src/schematron.c ('k') | third_party/libxml/src/tree.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 * testModule.c : a small tester program for xmlModule 2 * testModule.c : a small tester program for xmlModule
3 * 3 *
4 * See Copyright for the status of this software. 4 * See Copyright for the status of this software.
5 * 5 *
6 * joelwreed@comcast.net 6 * joelwreed@comcast.net
7 */ 7 */
8 8
9 #include "libxml.h" 9 #include "libxml.h"
10 #ifdef LIBXML_MODULES_ENABLED 10 #ifdef LIBXML_MODULES_ENABLED
(...skipping 29 matching lines...) Expand all
40 40
41 typedef int (*hello_world_t)(void); 41 typedef int (*hello_world_t)(void);
42 42
43 int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { 43 int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
44 xmlChar filename[PATH_MAX]; 44 xmlChar filename[PATH_MAX];
45 xmlModulePtr module = NULL; 45 xmlModulePtr module = NULL;
46 hello_world_t hello_world = NULL; 46 hello_world_t hello_world = NULL;
47 47
48 /* build the module filename, and confirm the module exists */ 48 /* build the module filename, and confirm the module exists */
49 xmlStrPrintf(filename, sizeof(filename), 49 xmlStrPrintf(filename, sizeof(filename),
50 (const xmlChar*) "%s/testdso%s", 50 "%s/testdso%s",
51 (const xmlChar*)MODULE_PATH, 51 (const xmlChar*)MODULE_PATH,
52 (const xmlChar*)LIBXML_MODULE_EXTENSION); 52 (const xmlChar*)LIBXML_MODULE_EXTENSION);
53 53
54 module = xmlModuleOpen((const char*)filename, 0); 54 module = xmlModuleOpen((const char*)filename, 0);
55 if (module) 55 if (module)
56 { 56 {
57 if (xmlModuleSymbol(module, "hello_world", (void **) &hello_world)) { 57 if (xmlModuleSymbol(module, "hello_world", (void **) &hello_world)) {
58 fprintf(stderr, "Failure to lookup\n"); 58 fprintf(stderr, "Failure to lookup\n");
59 return(1); 59 return(1);
60 } 60 }
(...skipping 12 matching lines...) Expand all
73 return(0); 73 return(0);
74 } 74 }
75 75
76 #else 76 #else
77 #include <stdio.h> 77 #include <stdio.h>
78 int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { 78 int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
79 printf("%s : Module support not compiled in\n", argv[0]); 79 printf("%s : Module support not compiled in\n", argv[0]);
80 return(0); 80 return(0);
81 } 81 }
82 #endif /* LIBXML_SCHEMAS_ENABLED */ 82 #endif /* LIBXML_SCHEMAS_ENABLED */
OLDNEW
« no previous file with comments | « third_party/libxml/src/schematron.c ('k') | third_party/libxml/src/tree.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698