| 129 #else |
129 #else |
| 130 xs_init(pTHX) |
130 xs_init(pTHX) |
| 131 #endif |
131 #endif |
| 132 { |
132 { |
| 133 char *file = __FILE__; |
133 char *file = __FILE__; |
| |
134 GList *search_paths = purple_plugins_get_search_paths(); |
| 134 dXSUB_SYS; |
135 dXSUB_SYS; |
| 135 |
136 |
| 136 /* This one allows dynamic loading of perl modules in perl scripts by |
137 /* This one allows dynamic loading of perl modules in perl scripts by |
| 137 * the 'use perlmod;' construction */ |
138 * the 'use perlmod;' construction */ |
| 138 newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); |
139 newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); |
| 139 #ifdef _WIN32 |
140 #ifdef _WIN32 |
| 140 newXS("Win32CORE::bootstrap", boot_Win32CORE, file); |
141 newXS("Win32CORE::bootstrap", boot_Win32CORE, file); |
| 141 #endif |
142 #endif |
| |
143 |
| |
144 while (search_paths != NULL) { |
| |
145 gchar *uselib; |
| |
146 const gchar *search_path = search_paths->data; |
| |
147 search_paths = g_list_next(search_paths); |
| |
148 |
| |
149 uselib = g_strdup_printf("unshift @INC, \"%s%cperl\";", |
| |
150 search_path, G_DIR_SEPARATOR); |
| |
151 eval_pv(uselib, TRUE); |
| |
152 g_free(uselib); |
| |
153 } |
| 142 } |
154 } |
| 143 |
155 |
| 144 static void |
156 static void |
| 145 perl_init(void) |
157 perl_init(void) |
| 146 { |
158 { |