#ifdef USE_CALLOUT
case OP_CALLOUT_CODE:
{
- int dirs;
-
GET_MEMNUM_INC(mem, bp); // number
- GET_MEMNUM_INC(dirs, bp);
-
- fprintf(f, ":%d:%d", mem, dirs);
+ fprintf(f, ":%d", mem);
}
break;
case OP_CALLOUT_NAME:
{
- int dirs;
int id;
GET_MEMNUM_INC(id, bp); // id
GET_MEMNUM_INC(mem, bp); // number
- GET_MEMNUM_INC(dirs, bp);
- fprintf(f, ":%d:%d:%d:%p:%p", id, mem, dirs);
+ fprintf(f, ":%d:%d", id, mem);
}
break;
#endif
{
int call_result;
int num;
- int dirs;
+ int in;
+ CalloutListEntry* e;
OnigCalloutArgs args;
of = ONIG_CALLOUT_OF_NAME;
func = onig_get_callout_start_func_from_name_id(name_id);
callout_common_entry:
- GET_MEMNUM_INC(num, p);
- GET_MEMNUM_INC(dirs, p);
+ GET_MEMNUM_INC(num, p);
+
+ e = onig_reg_callout_list_at(reg, num);
+ in = e->in;
- if (IS_NOT_NULL(func) && (dirs & ONIG_CALLOUT_IN_PROGRESS) != 0) {
+ if (IS_NOT_NULL(func) && (in & ONIG_CALLOUT_IN_PROGRESS) != 0) {
CALLOUT_BODY(func, ONIG_CALLOUT_IN_PROGRESS, of, name_id,
num, msa->mp->callout_user_data, args, call_result);
switch (call_result) {
}
else {
retraction_callout2:
- if ((dirs & ONIG_CALLOUT_IN_RETRACTION) != 0) {
+ if ((in & ONIG_CALLOUT_IN_RETRACTION) != 0) {
if (of == ONIG_CALLOUT_OF_NAME) {
func = onig_get_callout_start_func_from_name_id(name_id);
if (IS_NOT_NULL(func)) {
return ONIG_NORMAL;
}
+
+/* builtin callout functions */
+
extern int
onig_builtin_fail(OnigCalloutArgs* args ARG_UNUSED, void* user_data ARG_UNUSED)
{
#define SIZE_OP_UPDATE_VAR (SIZE_OPCODE + SIZE_UPDATE_VAR_TYPE + SIZE_MEMNUM)
#ifdef USE_CALLOUT
-#define SIZE_OP_CALLOUT_CODE (SIZE_OPCODE + SIZE_MEMNUM + SIZE_MEMNUM)
-#define SIZE_OP_CALLOUT_NAME (SIZE_OPCODE + SIZE_MEMNUM + SIZE_MEMNUM + SIZE_MEMNUM)
+#define SIZE_OP_CALLOUT_CODE (SIZE_OPCODE + SIZE_MEMNUM)
+#define SIZE_OP_CALLOUT_NAME (SIZE_OPCODE + SIZE_MEMNUM + SIZE_MEMNUM)
#endif
#define MC_ESC(syn) (syn)->meta_char_table.esc