From 04abbb3e0dbc3373ffdd2445c9916da9c6be8d9e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 17 Jun 2012 14:11:45 +0000 Subject: [PATCH] 2012-06-17 16:08 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbamf/amfenc.c * contrib/hbamf/hbamf.hbx * contrib/hbamf/hbamfobj.prg * contrib/hbamf/readme.txt + applied Aleksander Czajczynski's patch for a missing class. Thank you very much, I didn't have to touch it, only autoupdate the .hbx file. --- harbour/ChangeLog | 9 +++++++++ harbour/contrib/hbamf/amfenc.c | 2 +- harbour/contrib/hbamf/hbamf.hbx | 1 + harbour/contrib/hbamf/hbamfobj.prg | 16 ++++++++++++++++ harbour/contrib/hbamf/readme.txt | 2 +- 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d69699bd4d..d5c006250c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,15 @@ The license applies to all entries newer than 2009-04-28. */ +2012-06-17 16:08 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/hbamf/amfenc.c + * contrib/hbamf/hbamf.hbx + * contrib/hbamf/hbamfobj.prg + * contrib/hbamf/readme.txt + + applied Aleksander Czajczynski's patch for a missing class. + Thank you very much, I didn't have to touch it, only + autoupdate the .hbx file. + 2012-06-17 15:59 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbrun/hbrun.hbp * utils/hbmk2/hbmk2.hbp diff --git a/harbour/contrib/hbamf/amfenc.c b/harbour/contrib/hbamf/amfenc.c index 8e48ba7847..a19b6cf2a0 100644 --- a/harbour/contrib/hbamf/amfenc.c +++ b/harbour/contrib/hbamf/amfenc.c @@ -948,7 +948,7 @@ static HB_BOOL amf3_serialize_object( amfContext * context, PHB_ITEM pItem ) { int result; - if( strcmp( hb_clsName( hb_objGetClass( pItem ) ), "RAWAMF" ) == 0 ) + if( strcmp( hb_clsName( hb_objGetClass( pItem ) ), "AMF_RAW" ) == 0 ) { PHB_ITEM pStr = hb_itemNew( NULL ); hb_arrayGet( pItem, 1, pStr ); diff --git a/harbour/contrib/hbamf/hbamf.hbx b/harbour/contrib/hbamf/hbamf.hbx index 14b356c888..1a02c24344 100644 --- a/harbour/contrib/hbamf/hbamf.hbx +++ b/harbour/contrib/hbamf/hbamf.hbx @@ -30,6 +30,7 @@ DYNAMIC AMF3_ENCODE DYNAMIC AMF3_FROMWA DYNAMIC AMFSTDIO_READ DYNAMIC AMF_OBJ +DYNAMIC AMF_RAW #if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBAMF__REQUEST ) #uncommand DYNAMIC => EXTERNAL diff --git a/harbour/contrib/hbamf/hbamfobj.prg b/harbour/contrib/hbamf/hbamfobj.prg index 7f0a1fc68d..e2446d4bad 100644 --- a/harbour/contrib/hbamf/hbamfobj.prg +++ b/harbour/contrib/hbamf/hbamfobj.prg @@ -60,3 +60,19 @@ METHOD msgNotFound( cMessage, ... ) CLASS AMF_Obj ENDIF RETURN NIL + +CREATE CLASS AMF_Raw + + METHOD New( cData ) CONSTRUCTOR + METHOD GetData INLINE ::cData + + PROTECTED: + VAR cData + +END CLASS + +METHOD New( cData ) CLASS AMF_Raw + + ::cData := cData + + RETURN self diff --git a/harbour/contrib/hbamf/readme.txt b/harbour/contrib/hbamf/readme.txt index 4d3025f380..41a3d1567f 100644 --- a/harbour/contrib/hbamf/readme.txt +++ b/harbour/contrib/hbamf/readme.txt @@ -58,7 +58,7 @@ Short description of Harbour functions lClose := xVal:lCloseWA SELECT ( xVal:nWorkArea ) - xVal := RawAMF():New( AMF3_FROMWA( xVal:bWhile, xVal:bFor, xVal:aFields, xVal:nCount, xVal:lStrTrim, 1, pOuterContext ) ) + xVal := AMF_Raw():New( AMF3_FROMWA( xVal:bWhile, xVal:bFor, xVal:aFields, xVal:nCount, xVal:lStrTrim, 1, pOuterContext ) ) IF lClose CLOSE ENDIF