From 4e55b4a133183907e6cc03733800747edc94a5d4 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Thu, 30 Sep 2010 08:10:40 +0000 Subject: [PATCH] 2010-09-30 10:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/compiler/hbmain.c + added support to compile code not encapsulated in function using HB_COMPILEFROMBUF() with -n2 switch --- harbour/ChangeLog | 5 +++++ harbour/src/compiler/hbmain.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d89e4bf02d..1a4836e1cf 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2010-09-30 10:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/compiler/hbmain.c + + added support to compile code not encapsulated in function using + HB_COMPILEFROMBUF() with -n2 switch + 2010-09-29 23:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/qtcore/hbqt_pointer.cpp * contrib/hbqt/qtcore/hbqt_misc.prg diff --git a/harbour/src/compiler/hbmain.c b/harbour/src/compiler/hbmain.c index 5844cab57c..d8b13c7a11 100644 --- a/harbour/src/compiler/hbmain.c +++ b/harbour/src/compiler/hbmain.c @@ -4155,7 +4155,11 @@ static int hb_compCompile( HB_COMP_DECL, const char * szPrg, const char * szBuff HB_COMP_PARAM->szFile = HB_COMP_PARAM->currModule; if( szBuffer ) - hb_compFunctionAdd( HB_COMP_PARAM, "", 0, FUN_PROCEDURE | FUN_FILE_FIRST | FUN_FILE_DECL ); + /* Generate the starting procedure frame, lower letters used + * intentionally to not create name conflicts when -n2 switch + * is used and we compile code not encapsulated in function. + */ + hb_compFunctionAdd( HB_COMP_PARAM, "__hbInit", 0, FUN_PROCEDURE | FUN_FILE_FIRST | FUN_FILE_DECL ); else { if( ! HB_COMP_PARAM->fQuiet )