mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-02-04 13:21:34 +00:00
Make initial port to phpc
This commit is contained in:
parent
30fab6eaf9
commit
fdf573ac73
5 changed files with 321 additions and 303 deletions
32
php_gnupg.h
32
php_gnupg.h
|
|
@ -32,32 +32,22 @@ extern zend_module_entry gnupg_module_entry;
|
|||
#endif
|
||||
|
||||
#include <gpgme.h>
|
||||
#include "phpc/phpc.h"
|
||||
|
||||
typedef struct gnupg_object{
|
||||
PHPC_OBJ_STRUCT_BEGIN(gnupg)
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
int errormode;
|
||||
char* errortxt;
|
||||
int signmode;
|
||||
gpgme_key_t *encryptkeys;
|
||||
unsigned int encrypt_size;
|
||||
HashTable *signkeys;
|
||||
HashTable *decryptkeys;
|
||||
zend_object zo;
|
||||
} gnupg_object;
|
||||
gpgme_error_t err;
|
||||
int errormode;
|
||||
char* errortxt;
|
||||
int signmode;
|
||||
gpgme_key_t *encryptkeys;
|
||||
unsigned int encrypt_size;
|
||||
HashTable *signkeys;
|
||||
HashTable *decryptkeys;
|
||||
PHPC_OBJ_STRUCT_END()
|
||||
|
||||
static zend_class_entry *gnupg_class_entry;
|
||||
|
||||
static inline gnupg_object *gnupg_object_from_obj(zend_object *obj) /* {{{ */ {
|
||||
return (gnupg_object*)((char*)(obj) - XtOffsetOf(gnupg_object, zo));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline gnupg_object *Z_GNUPGO_P(zval *zv) /* {{{ */ {
|
||||
return gnupg_object_from_obj(Z_OBJ_P((zv)));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
PHP_MINIT_FUNCTION(gnupg);
|
||||
PHP_MSHUTDOWN_FUNCTION(gnupg);
|
||||
PHP_MINFO_FUNCTION(gnupg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue