|
@@ -497,3 +497,33 @@ FIXUP_F_SPVE_T(spve_spve, 1, 2, 2, 0)
|
|
|
FIXUP_F_SPVE_T(spve_uint, 1, 2, 1, FPARAM_INT)
|
|
|
FIXUP_F_SPVE_T(spve_str, 1, 2, 1, FPARAM_STR)
|
|
|
FIXUP_F_SPVE_T(spve_null, 1, 1, 1, 0)
|
|
|
+
|
|
|
+/** get the corresp. fixup_free* function.
|
|
|
+ * @param f -fixup function pointer.
|
|
|
+ * @return - pointer to free_fixup function if known, 0 otherwise.
|
|
|
+ */
|
|
|
+free_fixup_function mod_fix_get_fixup_free(fixup_function f)
|
|
|
+{
|
|
|
+ if (f == fixup_str_null) return fixup_free_str_null;
|
|
|
+ if (f == fixup_str_str) return fixup_free_str_str;
|
|
|
+ /* no free fixup for fixup_uint_* (they overwrite the pointer
|
|
|
+ value with a number and the original value cannot be recovered) */
|
|
|
+ if (f == fixup_uint_null) return 0;
|
|
|
+ if (f == fixup_uint_uint) return 0;
|
|
|
+ if (f == fixup_regexp_null) return fixup_free_regexp_null;
|
|
|
+ if (f == fixup_pvar_null) return fixup_free_pvar_null;
|
|
|
+ if (f == fixup_pvar_pvar) return fixup_free_pvar_pvar;
|
|
|
+ if (f == fixup_pvar_str) return fixup_free_pvar_str;
|
|
|
+ if (f == fixup_pvar_str_str) return fixup_free_pvar_str_str;
|
|
|
+ if (f == fixup_igp_igp) return fixup_free_igp_igp;
|
|
|
+ if (f == fixup_igp_null) return fixup_free_igp_null;
|
|
|
+ if (f == fixup_igp_pvar) return fixup_free_igp_pvar;
|
|
|
+ if (f == fixup_igp_pvar_pvar) return fixup_free_igp_pvar_pvar;
|
|
|
+ if (f == fixup_spve_spve) return fixup_free_spve_spve;
|
|
|
+ if (f == fixup_spve_null) return fixup_free_spve_null;
|
|
|
+ /* no free fixup, because of the uint part (the uint cannot be freed,
|
|
|
+ see above fixup_uint_null) */
|
|
|
+ if (f == fixup_spve_uint) return 0;
|
|
|
+ if (f == fixup_spve_str) return fixup_free_spve_str;
|
|
|
+ return 0;
|
|
|
+}
|