mirror of
https://github.com/pmmp/ext-encoding.git
synced 2024-11-23 13:36:25 +00:00
d0e71a30aa
this isn't the final form, but these statics already turned out to be handy for the tests, and they'll probably be good for attributes and other stuff like it.
24 lines
522 B
C
24 lines
522 B
C
#ifndef BYTE_BUFFER_H
|
|
#define BYTE_BUFFER_H
|
|
|
|
extern "C" {
|
|
#include "php.h"
|
|
}
|
|
#include "../ZendUtil.h"
|
|
|
|
typedef struct _byte_buffer_zend_object {
|
|
zend_string* buffer;
|
|
size_t read_offset;
|
|
size_t write_offset;
|
|
size_t used;
|
|
zend_object std;
|
|
} byte_buffer_zend_object;
|
|
|
|
#define BYTE_BUFFER_FROM_ZVAL(zv) fetch_from_zend_object<byte_buffer_zend_object>(Z_OBJ_P(zv))
|
|
#define BYTE_BUFFER_THIS() BYTE_BUFFER_FROM_ZVAL(ZEND_THIS)
|
|
|
|
extern zend_class_entry* byte_buffer_ce;
|
|
|
|
zend_class_entry* init_class_ByteBuffer(void);
|
|
#endif
|