mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-11-21 22:17:09 +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/*.out
|
||||||
tests/*.php
|
tests/*.php
|
||||||
tests/*.sh
|
tests/*.sh
|
||||||
|
tests/pubring.kbx
|
||||||
|
tests/random_seed
|
||||||
|
tests/sshcontrol
|
||||||
|
tests/trustdb.gpg
|
||||||
|
|
||||||
# coverage
|
# coverage
|
||||||
/coverage.info
|
/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
|
#endif
|
||||||
|
|
||||||
#include <gpgme.h>
|
#include <gpgme.h>
|
||||||
|
#include "phpc/phpc.h"
|
||||||
|
|
||||||
typedef struct gnupg_object{
|
PHPC_OBJ_STRUCT_BEGIN(gnupg)
|
||||||
gpgme_ctx_t ctx;
|
gpgme_ctx_t ctx;
|
||||||
gpgme_error_t err;
|
gpgme_error_t err;
|
||||||
int errormode;
|
int errormode;
|
||||||
char* errortxt;
|
char* errortxt;
|
||||||
int signmode;
|
int signmode;
|
||||||
gpgme_key_t *encryptkeys;
|
gpgme_key_t *encryptkeys;
|
||||||
unsigned int encrypt_size;
|
unsigned int encrypt_size;
|
||||||
HashTable *signkeys;
|
HashTable *signkeys;
|
||||||
HashTable *decryptkeys;
|
HashTable *decryptkeys;
|
||||||
zend_object zo;
|
PHPC_OBJ_STRUCT_END()
|
||||||
} gnupg_object;
|
|
||||||
|
|
||||||
static zend_class_entry *gnupg_class_entry;
|
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_MINIT_FUNCTION(gnupg);
|
||||||
PHP_MSHUTDOWN_FUNCTION(gnupg);
|
PHP_MSHUTDOWN_FUNCTION(gnupg);
|
||||||
PHP_MINFO_FUNCTION(gnupg);
|
PHP_MINFO_FUNCTION(gnupg);
|
||||||
|
|
1
phpc
Submodule
1
phpc
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 28b8bdf2a78a31772a325099806eb984ac9063ea
|
Loading…
Reference in a new issue