mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-12-22 09:51:41 +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
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -63,6 +63,10 @@ tests/*.log
|
|||
tests/*.out
|
||||
tests/*.php
|
||||
tests/*.sh
|
||||
tests/pubring.kbx
|
||||
tests/random_seed
|
||||
tests/sshcontrol
|
||||
tests/trustdb.gpg
|
||||
|
||||
# coverage
|
||||
/coverage.info
|
||||
|
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "phpc"]
|
||||
path = phpc
|
||||
url = https://github.com/bukka/phpc
|
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);
|
||||
|
|
1
phpc
Submodule
1
phpc
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 28b8bdf2a78a31772a325099806eb984ac9063ea
|
Loading…
Reference in a new issue