flush
[m6w6/ext-psi] / src / types.h
index a4e5dadcaae1552221911338a70f975b9ba3b8b4..97f00d4c43e9b349580eac07b2e31a759b399b59 100644 (file)
@@ -1,12 +1,6 @@
 #ifndef _PSI_TYPES_H
 #define _PSI_TYPES_H
 
-#include "Zend/zend_API.h"
-typedef struct zend_fcall {
-       zend_fcall_info fci;
-       zend_fcall_info_cache fcc;
-} zend_fcall;
-
 #include "token.h"
 
 #include "types/impl_val.h"
@@ -60,31 +54,10 @@ typedef struct zend_fcall {
 #include "types/decl_file.h"
 #include "types/decl_libs.h"
 
-
-static inline int weak_decl_type(decl_type *type) {
-       switch (type->type) {
-       case PSI_T_CHAR:
-       case PSI_T_SHORT:
-       case PSI_T_INT:
-       case PSI_T_LONG:
-       case PSI_T_NAME:
-               return type->type;
-       default:
-               return 0;
-       }
-}
-
-static inline decl_type *real_decl_type(decl_type *type) {
-       while (weak_decl_type(type)) {
-               type = type->real.def->type;
-       }
-       return type;
-}
-
 static inline impl_val *deref_impl_val(impl_val *ret_val, decl_var *var) {
        unsigned i;
 
-       ZEND_ASSERT(var->arg->var != var);
+       ZEND_ASSERT(!var->arg || var->arg->var != var);
 #if 0
        fprintf(stderr, "deref: %s pl=%u:%u as=%u:%u %p\n",
                        var->name, var->pointer_level, var->arg->var->pointer_level,
@@ -133,9 +106,4 @@ static inline impl_val *struct_member_ref(decl_arg *set_arg, impl_val *struct_pt
        return ptr;
 }
 
-
-#define PSI_ERROR 16
-#define PSI_WARNING 32
-typedef void (*psi_error_cb)(void *context, struct psi_token *token, int type, const char *msg, ...);
-
 #endif