| 128 GaimPluginPrefFrame * |
128 GaimPluginPrefFrame * |
| 129 gaim_perl_get_plugin_frame(GaimPlugin *plugin) |
129 gaim_perl_get_plugin_frame(GaimPlugin *plugin) |
| 130 { |
130 { |
| 131 /* Sets up the Perl Stack for our call back into the script to run the |
131 /* Sets up the Perl Stack for our call back into the script to run the |
| 132 * plugin_pref... sub */ |
132 * plugin_pref... sub */ |
| |
133 int count; |
| |
134 GaimPerlScript *gps; |
| 133 GaimPluginPrefFrame *ret_frame; |
135 GaimPluginPrefFrame *ret_frame; |
| 134 int count; |
|
| 135 dSP; |
136 dSP; |
| |
137 |
| |
138 gps = (GaimPerlScript *)plugin->info->extra_info; |
| 136 |
139 |
| 137 ENTER; |
140 ENTER; |
| 138 SAVETMPS; |
141 SAVETMPS; |
| 139 /* Some perl magic to run perl_plugin_pref_frame_SV perl sub and |
142 /* Some perl magic to run perl_plugin_pref_frame_SV perl sub and |
| 140 * return the frame */ |
143 * return the frame */ |
| 141 PUSHMARK(SP); |
144 PUSHMARK(SP); |
| 142 PUTBACK; |
145 PUTBACK; |
| 143 |
146 |
| 144 count = call_pv(perl_plugin_pref_cb, G_SCALAR | G_NOARGS); |
147 count = call_pv(gps->prefs_sub, G_SCALAR | G_NOARGS); |
| 145 |
148 |
| 146 SPAGAIN; |
149 SPAGAIN; |
| 147 |
150 |
| 148 if (count != 1) |
151 if (count != 1) |
| 149 croak("call_pv: Did not return the correct number of values.\n"); |
152 croak("call_pv: Did not return the correct number of values.\n"); |