OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
-#include "php_psi_stdinc.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# include "php_config.h"
+#endif
#include <ctype.h>
T->col = col;
T->line = line;
T->file = zend_string_copy(file);
- T->text = zend_string_init_interned(token_txt, token_len, 1);
+ T->text = psi_string_init_interned(token_txt, token_len, 1);
#if PSI_DEBUG_TOKEN_ALLOC
- PSI_DEBUG_PRINT(cpp->parser, "PSI: token_init %p\n", T);
+ fprintf(stderr, "PSI: token_init %p\t", T);
+ psi_token_dump(NULL, T);
#endif
return T;
}
if (*token_ptr) {
struct psi_token *token = *token_ptr;
#if PSI_DEBUG_TOKEN_ALLOC
- PSI_DEBUG_PRINT(cpp->parser, "PSI: token_free %p\n", token);
+ fprintf(stderr, "PSI: token_free %p\t", token);
+ psi_token_dump(NULL, token);
#endif
*token_ptr = NULL;
zend_string_release(token->text);
*ptr = *src;
#if PSI_DEBUG_TOKEN_ALLOC
- PSI_DEBUG_PRINT(cpp->parser, "PSI: token_copy %p <= %p\n", ptr, src);
+ fprintf(stderr, "PSI: token_copy %p\t", ptr);
+ psi_token_dump(NULL, src);
#endif
ptr->text = zend_string_copy(ptr->text);
ptr->file = zend_string_copy(ptr->file);
T->text = smart_str_extract(&text);
#if PSI_DEBUG_TOKEN_ALLOC
- PSI_DEBUG_PRINT(cpp->parser, "PSI: token_cat %p\n", T);
+ fprintf(stderr, "PSI: token_cat %p\n", T);
#endif
return T;
}