2025-12-15 11:10 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* src/vm/runner.c
! fix indentation
! previous change was not backwards compatible with hb_hrbLoad()
stealing character argument, that would be otherwise passed
to INIT PROCEDURE's in .hrb file
* src/include/hb_hrb.ch
+ add HB_HRB_ARG_PRGNAME definition
use to pass "virtual" script.prg filename as third parameter
hb_hrbLoad( HB_HRB_ARG_PRGNAME + <nOptions>, cPCode, cFileName )
This commit is contained in:
@@ -7,6 +7,19 @@
|
|||||||
Entries may not always be in chronological/commit order.
|
Entries may not always be in chronological/commit order.
|
||||||
See license at the end of file. */
|
See license at the end of file. */
|
||||||
|
|
||||||
|
2025-12-15 11:10 UTC+0100 Aleksander Czajczynski (hb fki.pl)
|
||||||
|
* src/vm/runner.c
|
||||||
|
! fix indentation
|
||||||
|
|
||||||
|
! previous change was not backwards compatible with hb_hrbLoad()
|
||||||
|
stealing character argument, that would be otherwise passed
|
||||||
|
to INIT PROCEDURE's in .hrb file
|
||||||
|
|
||||||
|
* src/include/hb_hrb.ch
|
||||||
|
+ add HB_HRB_ARG_PRGNAME definition
|
||||||
|
use to pass "virtual" script.prg filename as third parameter
|
||||||
|
hb_hrbLoad( HB_HRB_ARG_PRGNAME + <nOptions>, cPCode, cFileName )
|
||||||
|
|
||||||
2025-12-14 00:00 UTC-0300 Lailton Fernando Mariano (lailton/at/paysoft.com.br)
|
2025-12-14 00:00 UTC-0300 Lailton Fernando Mariano (lailton/at/paysoft.com.br)
|
||||||
* src/vm/runner.c
|
* src/vm/runner.c
|
||||||
* HB_HRBLOAD: support optional filename for in-memory HRB load
|
* HB_HRBLOAD: support optional filename for in-memory HRB load
|
||||||
|
|||||||
@@ -71,6 +71,11 @@
|
|||||||
with unresolved or cross function
|
with unresolved or cross function
|
||||||
references */
|
references */
|
||||||
|
|
||||||
|
#define HB_HRB_ARG_PRGNAME 0x10 /* first <xparams> argument of
|
||||||
|
is "virtual" script.prg filename
|
||||||
|
hb_hrbLoad( [ <nOptions>, ]
|
||||||
|
<cHrb>
|
||||||
|
[, <xparams,...> ] ) */
|
||||||
|
|
||||||
#define HB_HRB_FUNC_PUBLIC 0x1 /* locally defined public functions */
|
#define HB_HRB_FUNC_PUBLIC 0x1 /* locally defined public functions */
|
||||||
#define HB_HRB_FUNC_STATIC 0x2 /* locally defined static functions */
|
#define HB_HRB_FUNC_STATIC 0x2 /* locally defined static functions */
|
||||||
|
|||||||
@@ -732,6 +732,10 @@ HB_FUNC( HB_HRBLOAD )
|
|||||||
if( HB_ISNUM( 1 ) )
|
if( HB_ISNUM( 1 ) )
|
||||||
{
|
{
|
||||||
usMode = ( HB_USHORT ) hb_parni( 1 );
|
usMode = ( HB_USHORT ) hb_parni( 1 );
|
||||||
|
|
||||||
|
if( usMode == HB_HRB_ARG_PRGNAME )
|
||||||
|
usMode += HB_HRB_BIND_DEFAULT;
|
||||||
|
|
||||||
nParam++;
|
nParam++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -745,7 +749,8 @@ HB_FUNC( HB_HRBLOAD )
|
|||||||
if( hb_hrbCheckSig( fileOrBody, nLen ) != 0 )
|
if( hb_hrbCheckSig( fileOrBody, nLen ) != 0 )
|
||||||
{
|
{
|
||||||
const char * szFileName = NULL;
|
const char * szFileName = NULL;
|
||||||
if( hb_pcount() > nParam && HB_ISCHAR( nParam + 1 ) )
|
if( ( usMode & HB_HRB_ARG_PRGNAME ) &&
|
||||||
|
hb_pcount() > nParam && HB_ISCHAR( nParam + 1 ) )
|
||||||
{
|
{
|
||||||
szFileName = hb_parc( nParam + 1 );
|
szFileName = hb_parc( nParam + 1 );
|
||||||
nParam++;
|
nParam++;
|
||||||
|
|||||||
Reference in New Issue
Block a user