In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/515fe3bd5a6032b6cb95d6331b812add93160bfd?hp=43639bac1f28a48b8efcdee9011ac1116f2dad8d>

- Log -----------------------------------------------------------------
commit 515fe3bd5a6032b6cb95d6331b812add93160bfd
Author: Adam Russell <[email protected]>
Date:   Sun Jun 28 18:04:00 2009 -0400

    patch submission(symbian/symbian_utils.dll)
    
    Another symbian update.
    Changes in this patch are describe below...
    
    Changes made by Osvaldo Villalon:
      -deleted references to TDllReason
      -replaced TInt64.Low() with the I64LOW(TInt64) Macro
      -updated the 'Create' function call
    Changes made by Adam Russell:
      -in order to resolve two kernel panics:
      -removed reference to PL_clocktick at line 198 as it
       is not correctly defined when first called there
      -changed CPerlBase to call a new constructor I created
       in Perl Base.cpp. The reason for this is that the new
       constructor does not push anything into the CleanupStack
       because doing so from a console app will cause a panic.
    
    Signed-off-by: H.Merijn Brand <[email protected]>
-----------------------------------------------------------------------

Summary of changes:
 symbian/symbian_utils.cpp |   31 ++++++++++++++++++-------------
 1 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/symbian/symbian_utils.cpp b/symbian/symbian_utils.cpp
index e6483ef..d4448fe 100644
--- a/symbian/symbian_utils.cpp
+++ b/symbian/symbian_utils.cpp
@@ -76,6 +76,8 @@ extern "C" {
 #ifdef PERL_GLOBAL_STRUCT /* Avoid unused variable warning. */
         dVAR;
 #endif
+        if(!PL_appctx)
+               ((CPerlBase*)PL_appctx) = CPerlBase::NewInterpreter();
         return ((CPerlBase*)PL_appctx)->ConsoleRead(fd, b, n);
     }
     EXPORT_C SSize_t symbian_write_stdout(const int fd, const char *b, int n)
@@ -83,6 +85,8 @@ extern "C" {
 #ifdef PERL_GLOBAL_STRUCT /* Avoid unused variable warning. */
         dVAR;
 #endif
+        if(!PL_appctx)
+               ((CPerlBase*)PL_appctx) = CPerlBase::NewInterpreter();
         return ((CPerlBase*)PL_appctx)->ConsoleWrite(fd, b, n);
     }
     static const char NullErr[] = "";
@@ -171,7 +175,7 @@ extern "C" {
        } else {
          buf8.Format(_L8("Symbian error %d"), error);
        }
-        SV* sv = Perl_get_sv(aTHX_ "\005", GV_ADD); /* $^E or ${^OS_ERROR} */
+        SV* sv = Perl_get_sv(aTHX_ "\005", TRUE); /* $^E or ${^OS_ERROR} */
         if (!sv)
             return (char*)NullErr;
         sv_setpv(sv, (const char *)buf8.PtrZ());
@@ -195,13 +199,13 @@ extern "C" {
         TUint  tick   = User::TickCount();
         if (PL_timesbase.tms_utime == 0) {
             PL_timesbase.tms_utime = tick;
-            PL_clocktick = PERL_SYMBIAN_CLK_TCK;
+            //PL_clocktick = PERL_SYMBIAN_CLK_TCK;
         }
         tick -= PL_timesbase.tms_utime;
         TInt64 tickus = TInt64(tick) * TInt64(periodus);
         TInt64 tmps   = tickus / 1000000;
-        if (sec)  *sec  = tmps.Low();
-        if (usec) *usec = tickus.Low() - tmps.Low() * 1000000;
+        if (sec)  *sec  = I64LOW(tmps);
+        if (usec) *usec = I64LOW(tickus) - I64LOW(tmps) * 1000000;
         return 0;
     }
     EXPORT_C int symbian_usleep(unsigned int usec)
@@ -284,15 +288,16 @@ extern "C" {
         if (error == KErrNone) {
             TThreadFunction func = (TThreadFunction)(lib.Lookup(1));
             if (func)
-                error = proc.Create(aFilename,
-                                    func,
-                                    KStackSize,
-                                    (TAny*)command,
-                                    &lib,
-                                    RThread().Heap(),
-                                    KHeapMin,
-                                    KHeapMax,
-                                    EOwnerProcess);
+               error = proc.Create(aFilename,
+                                                   func,
+                                                   KStackSize,
+                                                 //  (TAny*)command,
+                                                 //  &lib,
+                                                 //  RThread().Heap(),
+                                                   KHeapMin,
+                                                   KHeapMax,
+                                                   (TAny*)command,
+                                                   EOwnerProcess);
             else
                 error = KErrNotFound;
             lib.Close();

--
Perl5 Master Repository

Reply via email to