diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0b35230ffb..b5d2fa6997 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,21 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-10-23 11:33 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbssl/evpciph.c + * contrib/hbssl/sslsess.c + * contrib/hbssl/ssl.c + * contrib/hbssl/x509.c + * contrib/hbssl/evpmd.c + * contrib/hbssl/evpenc.c + * contrib/hbssl/sslctx.c + * contrib/hbssl/evppkey.c + + Changed to use new GC allocation method. + Please review me. + + * contrib/hbqt/Makefile + * Minor refinement to build order. + 2009-10-23 10:23 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/hbqts/Makefile * contrib/hbqt/qtgui/qtguis/Makefile diff --git a/harbour/contrib/hbqt/Makefile b/harbour/contrib/hbqt/Makefile index 39eb9dad25..9f7292e975 100644 --- a/harbour/contrib/hbqt/Makefile +++ b/harbour/contrib/hbqt/Makefile @@ -20,17 +20,17 @@ ifneq ($(HB_HAS_QT),) include $(TOP)$(ROOT)config/header.mk include $(TOP)$(ROOT)config/lib.mk - DIRS += \ - qtcore \ - qtgui \ - qtnetwork \ - qtwebkit - ifneq ($(filter $(HB_PLATFORM),win wce),) ifneq ($(HB_QT_STATIC),) DIRS += hbqts endif endif + DIRS += \ + qtcore \ + qtgui \ + qtnetwork \ + qtwebkit + include $(TOP)$(ROOT)config/dir.mk endif diff --git a/harbour/contrib/hbssl/evpciph.c b/harbour/contrib/hbssl/evpciph.c index 967138c7e6..9c0e571f7f 100644 --- a/harbour/contrib/hbssl/evpciph.c +++ b/harbour/contrib/hbssl/evpciph.c @@ -80,14 +80,20 @@ static HB_GARBAGE_FUNC( EVP_CIPHER_CTX_release ) } } +static const HB_GC_FUNCS s_gcEVP_CIPHER_CTX_funcs = +{ + EVP_CIPHER_CTX_release, + hb_gcDummyMark +}; + static void * hb_EVP_CIPHER_CTX_is( int iParam ) { - return hb_parptrGC( EVP_CIPHER_CTX_release, iParam ); + return hb_parptrGC( &s_gcEVP_CIPHER_CTX_funcs, iParam ); } static EVP_CIPHER_CTX * hb_EVP_CIPHER_CTX_par( int iParam ) { - void ** ph = ( void ** ) hb_parptrGC( EVP_CIPHER_CTX_release, iParam ); + void ** ph = ( void ** ) hb_parptrGC( &s_gcEVP_CIPHER_CTX_funcs, iParam ); return ph ? ( EVP_CIPHER_CTX * ) * ph : NULL; } @@ -426,7 +432,7 @@ HB_FUNC( EVP_CIPHER_TYPE ) HB_FUNC( HB_EVP_CIPHER_CTX_CREATE ) { - void ** ph = ( void ** ) hb_gcAlloc( sizeof( EVP_CIPHER_CTX * ), EVP_CIPHER_CTX_release ); + void ** ph = ( void ** ) hb_gcAllocate( sizeof( EVP_CIPHER_CTX * ), &s_gcEVP_CIPHER_CTX_funcs ); EVP_CIPHER_CTX * ctx = ( EVP_CIPHER_CTX * ) hb_xgrab( sizeof( EVP_CIPHER_CTX ) ); diff --git a/harbour/contrib/hbssl/evpenc.c b/harbour/contrib/hbssl/evpenc.c index 6d5fda328a..b217fb12d8 100644 --- a/harbour/contrib/hbssl/evpenc.c +++ b/harbour/contrib/hbssl/evpenc.c @@ -73,21 +73,27 @@ static HB_GARBAGE_FUNC( EVP_ENCODE_CTX_release ) } } +static const HB_GC_FUNCS s_gcEVP_ENCODE_CTX_funcs = +{ + EVP_ENCODE_CTX_release, + hb_gcDummyMark +}; + static void * hb_EVP_ENCODE_CTX_is( int iParam ) { - return hb_parptrGC( EVP_ENCODE_CTX_release, iParam ); + return hb_parptrGC( &s_gcEVP_ENCODE_CTX_funcs, iParam ); } static EVP_ENCODE_CTX * hb_EVP_ENCODE_CTX_par( int iParam ) { - void ** ph = ( void ** ) hb_parptrGC( EVP_ENCODE_CTX_release, iParam ); + void ** ph = ( void ** ) hb_parptrGC( &s_gcEVP_ENCODE_CTX_funcs, iParam ); return ph ? ( EVP_ENCODE_CTX * ) * ph : NULL; } HB_FUNC( HB_EVP_ENCODE_CTX_CREATE ) { - void ** ph = ( void ** ) hb_gcAlloc( sizeof( EVP_ENCODE_CTX * ), EVP_ENCODE_CTX_release ); + void ** ph = ( void ** ) hb_gcAllocate( sizeof( EVP_ENCODE_CTX * ), &s_gcEVP_ENCODE_CTX_funcs ); EVP_ENCODE_CTX * ctx = ( EVP_ENCODE_CTX * ) hb_xgrab( sizeof( EVP_ENCODE_CTX ) ); diff --git a/harbour/contrib/hbssl/evpmd.c b/harbour/contrib/hbssl/evpmd.c index d59c9d15a0..0cd712c5c8 100644 --- a/harbour/contrib/hbssl/evpmd.c +++ b/harbour/contrib/hbssl/evpmd.c @@ -78,14 +78,20 @@ static HB_GARBAGE_FUNC( EVP_MD_CTX_release ) } } +static const HB_GC_FUNCS s_gcEVP_MD_CTX_funcs = +{ + EVP_MD_CTX_release, + hb_gcDummyMark +}; + static void * hb_EVP_MD_CTX_is( int iParam ) { - return hb_parptrGC( EVP_MD_CTX_release, iParam ); + return hb_parptrGC( &s_gcEVP_MD_CTX_funcs, iParam ); } static EVP_MD_CTX * hb_EVP_MD_CTX_par( int iParam ) { - void ** ph = ( void ** ) hb_parptrGC( EVP_MD_CTX_release, iParam ); + void ** ph = ( void ** ) hb_parptrGC( &s_gcEVP_MD_CTX_funcs, iParam ); return ph ? ( EVP_MD_CTX * ) * ph : NULL; } @@ -238,7 +244,7 @@ HB_FUNC( EVP_MD_BLOCK_SIZE ) HB_FUNC( EVP_MD_CTX_CREATE ) { - void ** ph = ( void ** ) hb_gcAlloc( sizeof( EVP_MD_CTX * ), EVP_MD_CTX_release ); + void ** ph = ( void ** ) hb_gcAllocate( sizeof( EVP_MD_CTX * ), &s_gcEVP_MD_CTX_funcs ); EVP_MD_CTX * ctx = EVP_MD_CTX_create(); diff --git a/harbour/contrib/hbssl/evppkey.c b/harbour/contrib/hbssl/evppkey.c index f2a26ab3a7..265ef7a741 100644 --- a/harbour/contrib/hbssl/evppkey.c +++ b/harbour/contrib/hbssl/evppkey.c @@ -73,21 +73,27 @@ static HB_GARBAGE_FUNC( EVP_PKEY_release ) } } +static const HB_GC_FUNCS s_gcEVP_PKEY_funcs = +{ + EVP_PKEY_release, + hb_gcDummyMark +}; + void * hb_EVP_PKEY_is( int iParam ) { - return hb_parptrGC( EVP_PKEY_release, iParam ); + return hb_parptrGC( &s_gcEVP_PKEY_funcs, iParam ); } EVP_PKEY * hb_EVP_PKEY_par( int iParam ) { - void ** ph = ( void ** ) hb_parptrGC( EVP_PKEY_release, iParam ); + void ** ph = ( void ** ) hb_parptrGC( &s_gcEVP_PKEY_funcs, iParam ); return ph ? ( EVP_PKEY * ) * ph : NULL; } HB_FUNC( EVP_PKEY_NEW ) { - void ** ph = ( void ** ) hb_gcAlloc( sizeof( EVP_PKEY * ), EVP_PKEY_release ); + void ** ph = ( void ** ) hb_gcAllocate( sizeof( EVP_PKEY * ), &s_gcEVP_PKEY_funcs ); EVP_PKEY * ctx = EVP_PKEY_new(); diff --git a/harbour/contrib/hbssl/ssl.c b/harbour/contrib/hbssl/ssl.c index ba13a15adc..282391fa8a 100644 --- a/harbour/contrib/hbssl/ssl.c +++ b/harbour/contrib/hbssl/ssl.c @@ -104,14 +104,20 @@ static HB_GARBAGE_FUNC( SSL_release ) } } +static const HB_GC_FUNCS s_gcSSL_funcs = +{ + SSL_release, + hb_gcDummyMark +}; + void * hb_SSL_is( int iParam ) { - return hb_parptrGC( SSL_release, iParam ); + return hb_parptrGC( &s_gcSSL_funcs, iParam ); } SSL * hb_SSL_par( int iParam ) { - void ** ph = ( void ** ) hb_parptrGC( SSL_release, iParam ); + void ** ph = ( void ** ) hb_parptrGC( &s_gcSSL_funcs, iParam ); return ph ? ( SSL * ) * ph : NULL; } @@ -124,7 +130,7 @@ HB_FUNC( SSL_NEW ) if( ctx ) { - void ** ph = ( void ** ) hb_gcAlloc( sizeof( SSL * ), SSL_release ); + void ** ph = ( void ** ) hb_gcAllocate( sizeof( SSL * ), &s_gcSSL_funcs ); SSL * ssl = SSL_new( ctx ); @@ -145,7 +151,7 @@ HB_FUNC( SSL_DUP ) if( ssl_par ) { - void ** ph = ( void ** ) hb_gcAlloc( sizeof( SSL * ), SSL_release ); + void ** ph = ( void ** ) hb_gcAllocate( sizeof( SSL * ), &s_gcSSL_funcs ); SSL * ssl = SSL_dup( ssl_par ); diff --git a/harbour/contrib/hbssl/sslctx.c b/harbour/contrib/hbssl/sslctx.c index 676050809b..34478d36a0 100644 --- a/harbour/contrib/hbssl/sslctx.c +++ b/harbour/contrib/hbssl/sslctx.c @@ -71,14 +71,20 @@ static HB_GARBAGE_FUNC( SSL_CTX_release ) } } +static const HB_GC_FUNCS s_gcSSL_CTX_funcs = +{ + SSL_CTX_release, + hb_gcDummyMark +}; + void * hb_SSL_CTX_is( int iParam ) { - return hb_parptrGC( SSL_CTX_release, iParam ); + return hb_parptrGC( &s_gcSSL_CTX_funcs, iParam ); } SSL_CTX * hb_SSL_CTX_par( int iParam ) { - void ** ph = ( void ** ) hb_parptrGC( SSL_CTX_release, iParam ); + void ** ph = ( void ** ) hb_parptrGC( &s_gcSSL_CTX_funcs, iParam ); return ph ? ( SSL_CTX * ) * ph : NULL; } @@ -109,7 +115,7 @@ const SSL_METHOD * hb_ssl_method_id_to_ptr( int n ) HB_FUNC( SSL_CTX_NEW ) { - void ** ph = ( void ** ) hb_gcAlloc( sizeof( SSL_CTX * ), SSL_CTX_release ); + void ** ph = ( void ** ) hb_gcAllocate( sizeof( SSL_CTX * ), &s_gcSSL_CTX_funcs ); #if OPENSSL_VERSION_NUMBER < 0x10000000L SSL_CTX * ctx = SSL_CTX_new( ( SSL_METHOD * ) hb_ssl_method_id_to_ptr( HB_ISNUM( 1 ) ? hb_parni( 1 ) : HB_SSL_CTX_NEW_METHOD_DEFAULT ) ); diff --git a/harbour/contrib/hbssl/sslsess.c b/harbour/contrib/hbssl/sslsess.c index f86b5106cb..a4dcf13db2 100644 --- a/harbour/contrib/hbssl/sslsess.c +++ b/harbour/contrib/hbssl/sslsess.c @@ -70,21 +70,27 @@ static HB_GARBAGE_FUNC( SSL_SESSION_release ) } } +static const HB_GC_FUNCS s_gcSSL_SESSION_funcs = +{ + SSL_SESSION_release, + hb_gcDummyMark +}; + void * hb_SSL_SESSION_is( int iParam ) { - return hb_parptrGC( SSL_SESSION_release, iParam ); + return hb_parptrGC( &s_gcSSL_SESSION_funcs, iParam ); } SSL_SESSION * hb_SSL_SESSION_par( int iParam ) { - void ** ph = ( void ** ) hb_parptrGC( SSL_SESSION_release, iParam ); + void ** ph = ( void ** ) hb_parptrGC( &s_gcSSL_SESSION_funcs, iParam ); return ph ? ( SSL_SESSION * ) * ph : NULL; } HB_FUNC( SSL_SESSION_NEW ) { - void ** ph = ( void ** ) hb_gcAlloc( sizeof( SSL_SESSION * ), SSL_SESSION_release ); + void ** ph = ( void ** ) hb_gcAllocate( sizeof( SSL_SESSION * ), &s_gcSSL_SESSION_funcs ); SSL_SESSION * session = SSL_SESSION_new(); diff --git a/harbour/contrib/hbssl/x509.c b/harbour/contrib/hbssl/x509.c index 2bd0b03f2e..a3a11eb685 100644 --- a/harbour/contrib/hbssl/x509.c +++ b/harbour/contrib/hbssl/x509.c @@ -70,21 +70,27 @@ static HB_GARBAGE_FUNC( X509_release ) } } +static const HB_GC_FUNCS s_gcX509_funcs = +{ + X509_release, + hb_gcDummyMark +}; + void * hb_X509_is( int iParam ) { - return hb_parptrGC( X509_release, iParam ); + return hb_parptrGC( &s_gcX509_funcs, iParam ); } X509 * hb_X509_par( int iParam ) { - void ** ph = ( void ** ) hb_parptrGC( X509_release, iParam ); + void ** ph = ( void ** ) hb_parptrGC( &s_gcX509_funcs, iParam ); return ph ? ( X509 * ) * ph : NULL; } void hb_X509_ret( X509 * x509 ) { - void ** ph = ( void ** ) hb_gcAlloc( sizeof( X509 * ), X509_release ); + void ** ph = ( void ** ) hb_gcAllocate( sizeof( X509 * ), &s_gcX509_funcs ); * ph = ( void * ) x509;