symbian/PerlUi.hrh Symbian Perl UI class resource header
symbian/PerlUiS60.rss Symbian app launcher resource definition
symbian/PerlUiS80.rss Symbian app launcher resource definition
+symbian/PerlUiS90.rss Symbian app launcher resource definition
symbian/PerlUiUIQ.rss Symbian app launcher resource definition
symbian/PerlUtil.cpp Symbian Perl utility class
symbian/PerlUtil.h Symbian Perl utility class header
These instructions have been tested under various Nokia Series 60
Symbian SDKs (1.2 to 2.6, 2.8 should also work, 1.2 compiles but
- does not work), and Series 80 2.0. You can get the SDKs from
- Forum Nokia (http://www.forum.nokia.com/). A very rough port
- ("it compiles") to UIQ 2.1 has also been made.
+ does not work), Series 80 2.0, and Nokia 7710 (Series 90) SDK.
+ You can get the SDKs from Forum Nokia (http://www.forum.nokia.com/).
+ A very rough port ("it compiles") to UIQ 2.0 has also been made.
A prerequisite for any of the SDKs is to install ActivePerl
from ActiveState, http://www.activestate.com/Products/ActivePerl/
the Metrowerks CodeWarrior installed (2.8 and 3.0 were used in testing)
or the Microsoft Visual C++ 6.0 installed (SP3 minimum, SP5 recommended).
- Note that for example the Serie s60 2.0 VC SDK installation talks
+ Note that for example the Series 60 2.0 VC SDK installation talks
about ActivePerl build 518, which does no more (as of mid-2005) exist
at the ActiveState website. The ActivePerl 5.8.4 build 810 was
used successfully for compiling Perl on Symbian. The 5.6.x ActivePerls
the VC6 makefiles and workspaces. "make vc6" will compile for the VC6,
and "make cw" for the CodeWarrior.
- The following Series 60, Series 80, and UIQ SDK and compiler
- configurations and Nokia phones that were tested at some point in time
- (+ = compiled and PerlApp run, - = not),
+ The following SDK and compiler configurations and Nokia phones were
+ tested at some point in time (+ = compiled and PerlApp run, - = not),
both for Perl 5.8.x and 5.9.x:
SDK | VC | CW |
S60 2.0 | + | + | 6600
S60 2.1 | - | + | 6670
S60 2.6 | + | + | 6630
- S60 2.8 | - | + | (not tested in device)
+ S60 2.8 | - | + | (not tested in a device)
S80 2.6 | - | + | 9300
- UIQ 2.0 | - | + | (not tested in device)
+ S90 1.1 | + | - | 7710
+ UIQ 2.0 | - | + | (not tested in a device)
+ (*) Compiles but does not work, unfortunately.
If you are using the 'make' directly, it is the GNU make from the SDKs,
and it will invoke the right make commands for the Windows emulator
build and the Arm target builds ('thumb' by default) as necessary.
- (*) Compiles but does not work, unfortunately.
The build scripts assume the 'absolute style' SDK installs under C:,
the 'subst style' will not work.
The Perl DLL is installed in \System\Libs\. The Perl libraries and
extension DLLs are installed in \System\Libs\Perl\X.Y.Z\. The PerlApp
is installed in \System\Apps\, and the SIS also installs a couple of
-demo scripts in \Perl\.
+demo scripts in \Perl\ (C:\Mydocs\Perl\ on Nokia 7710).
Note that the Symbian filesystem is very picky: it strongly prefers
the \ instead of the /.
We maintain the binary incompatibility.
+0.4.1: December 2006
+
+ - Perl 5.9.4 (patch level 29622)
+ - added extensions: Compress/Raw/Zlib, Digest/SHA,
+ Hash/Util, Math/BigInt/FastCalc, Text/Soundex, Time/Piece
+ - port to S90 1.1 by Alexander Smishlajev
+
+We maintain the binary incompatibility.
+
=back
=cut
Apd |STRLEN |sv_len_utf8 |NULLOK SV* sv
Apd |void |sv_magic |NN SV* sv|NULLOK SV* obj|int how|NULLOK const char* name \
|I32 namlen
-Apd |MAGIC *|sv_magicext |NN SV* sv|NULLOK SV* obj|int how|NULLOK MGVTBL *vtbl \
+Apd |MAGIC *|sv_magicext |NN SV* sv|NULLOK SV* obj|int how|NULLOK const MGVTBL *vtbl \
|NULLOK const char* name|I32 namlen
ApdaR |SV* |sv_mortalcopy |NULLOK SV* oldsv
ApdR |SV* |sv_newmortal
px |void |my_clearenv
#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+Apo |void* |my_cxt_init |NN const char *my_cxt_key|size_t size
+Apo |int |my_cxt_index |NN const char *my_cxt_key
+#else
Apo |void* |my_cxt_init |NN int *index|size_t size
#endif
+#endif
#ifndef HAS_STRLCAT
Apno |Size_t |my_strlcat |NULLOK char *dst|NULLOK const char *src|Size_t size
#define my_clearenv Perl_my_clearenv
#endif
#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+#else
+#endif
#endif
#ifndef HAS_STRLCAT
#endif
#define my_clearenv() Perl_my_clearenv(aTHX)
#endif
#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+#else
+#endif
#endif
#ifndef HAS_STRLCAT
#endif
#define PL_multi_end (vTHX->Imulti_end)
#define PL_multi_open (vTHX->Imulti_open)
#define PL_multi_start (vTHX->Imulti_start)
+#define PL_my_cxt_keys (vTHX->Imy_cxt_keys)
#define PL_my_cxt_list (vTHX->Imy_cxt_list)
#define PL_my_cxt_size (vTHX->Imy_cxt_size)
#define PL_nexttoke (vTHX->Inexttoke)
#define PL_Imulti_end PL_multi_end
#define PL_Imulti_open PL_multi_open
#define PL_Imulti_start PL_multi_start
+#define PL_Imy_cxt_keys PL_my_cxt_keys
#define PL_Imy_cxt_list PL_my_cxt_list
#define PL_Imy_cxt_size PL_my_cxt_size
#define PL_Inexttoke PL_nexttoke
Perl_my_snprintf
Perl_my_vsnprintf
Perl_my_cxt_init
+Perl_my_cxt_index
Perl_my_strlcat
Perl_my_strlcpy
# ex: set ro:
void
Perl_refcounted_he_free(pTHX_ struct refcounted_he *he) {
+ dVAR;
PERL_UNUSED_CONTEXT;
while (he) {
#ifdef PERL_IMPLICIT_CONTEXT
PERLVARI(Imy_cxt_size, int, 0) /* size of PL_my_cxt_list */
PERLVARI(Imy_cxt_list, void **, NULL) /* per-module array of MY_CXT pointers */
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+PERLVARI(Imy_cxt_keys, const char **, NULL) /* per-module array of pointers to MY_CXT_KEY constants */
+#endif
#endif
#ifdef PERL_TRACK_MEMPOOL
EXPLODE
+#ifndef SYMBIAN
static HV *${c_subname}_missing = NULL;
+#endif
DONT
'symbol_table',
$add_symbol_subname);
}
- print $xs_fh "\n", $explosives ? "" : <<"EOBOOT";
+ print $xs_fh $explosives ? "\n" : <<"EOBOOT";
+#ifndef SYMBIAN
${c_subname}_missing = newHV();
+#endif
EOBOOT
print $xs_fh <<"EOBOOT";
CvXSUB(cv) = NULL;
CvXSUBANY(cv).any_ptr = NULL;
}
-
+#ifndef SYMBIAN
if (!hv_store(${c_subname}_missing, value_for_notfound->name,
value_for_notfound->namelen, &PL_sv_yes, 0))
Perl_croak($athx "Couldn't add key '%s' to missing_hash",
value_for_notfound->name);
+#endif
DONT
print $xs_fh <<"EOBOOT";
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
+#ifdef SYMBIAN
+ sv = newSVpvf("%"SVf" is not a valid $package_sprintf_safe macro", sv);
+#else
if (hv_exists(${c_subname}_missing, s, SvUTF8(sv) ? -(I32)len : (I32)len)) {
sv = newSVpvf("Your vendor has not defined $package_sprintf_safe macro %" SVf
", used", sv);
sv = newSVpvf("%"SVf" is not a valid $package_sprintf_safe macro",
sv);
}
- PUSHs(sv_2mortal(sv));
+#endif
+ PUSHs(sv_2mortal(sv));
DONT
}
SSize_t pos;
STRLEN len;
STRLEN ulen = 0;
- MAGIC *found;
+ MAGIC* found;
PERL_UNUSED_ARG(mg);
sv_force_normal_flags(lsv, 0);
#endif
found = sv_magicext(lsv, NULL, PERL_MAGIC_regex_global, &PL_vtbl_mglob,
- NULL, 0);
+ NULL, 0);
}
else if (!SvOK(sv)) {
found->mg_len = -1;
# endif
#endif
+#if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_MSC_VER < 1400) && (WINVER < 0x0500)
+/* VC7 or 7.1, building with pre-VC7 runtime libraries. */
+long _ftol( double ); /* Defined by VC6 C libs. */
+long _ftol2( double dblSource ) { return _ftol( dblSource ); }
+#endif
+
/* The default is to use Perl's own atof() implementation (in numeric.c).
* Usually that is the one to use but for some platforms (e.g. UNICOS)
* it is however best to use the native implementation of atof.
#if defined(PERL_IMPLICIT_CONTEXT)
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+
+/* This must appear in all extensions that define a my_cxt_t structure,
+ * right after the definition (i.e. at file scope). The non-threads
+ * case below uses it to declare the data as static. */
+#define START_MY_CXT
+#define MY_CXT_INDEX Perl_my_cxt_index(aTHX_ MY_CXT_KEY)
+
+/* Creates and zeroes the per-interpreter data.
+ * (We allocate my_cxtp in a Perl SV so that it will be released when
+ * the interpreter goes away.) */
+#define MY_CXT_INIT \
+ my_cxt_t *my_cxtp = \
+ (my_cxt_t*)Perl_my_cxt_init(aTHX_ MY_CXT_KEY, sizeof(my_cxt_t))
+#define MY_CXT_INIT_INTERP(my_perl) \
+ my_cxt_t *my_cxtp = \
+ (my_cxt_t*)Perl_my_cxt_init(my_perl, MY_CXT_KEY, sizeof(my_cxt_t))
+
+/* This declaration should be used within all functions that use the
+ * interpreter-local data. */
+#define dMY_CXT \
+ my_cxt_t *my_cxtp = (my_cxt_t *)PL_my_cxt_list[MY_CXT_INDEX]
+#define dMY_CXT_INTERP(my_perl) \
+ my_cxt_t *my_cxtp = (my_cxt_t *)(my_perl)->Imy_cxt_list[MY_CXT_INDEX]
+
+/* Clones the per-interpreter data. */
+#define MY_CXT_CLONE \
+ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
+ Copy(PL_my_cxt_list[MY_CXT_INDEX], my_cxtp, 1, my_cxt_t);\
+ PL_my_cxt_list[MY_CXT_INDEX] = my_cxtp \
+
+#else /* #ifdef PERL_GLOBAL_STRUCT_PRIVATE */
+
/* This must appear in all extensions that define a my_cxt_t structure,
* right after the definition (i.e. at file scope). The non-threads
* case below uses it to declare the data as static. */
Copy(PL_my_cxt_list[my_cxt_index], my_cxtp, 1, my_cxt_t);\
PL_my_cxt_list[my_cxt_index] = my_cxtp \
+#endif /* #ifdef PERL_GLOBAL_STRUCT_PRIVATE */
+
/* This macro must be used to access members of the my_cxt_t structure.
* e.g. MYCXT.some_data */
#define MY_CXT (*my_cxtp)
#define PL_multi_open (*Perl_Imulti_open_ptr(aTHX))
#undef PL_multi_start
#define PL_multi_start (*Perl_Imulti_start_ptr(aTHX))
+#undef PL_my_cxt_keys
+#define PL_my_cxt_keys (*Perl_Imy_cxt_keys_ptr(aTHX))
#undef PL_my_cxt_list
#define PL_my_cxt_list (*Perl_Imy_cxt_list_ptr(aTHX))
#undef PL_my_cxt_size
void PerlIO_teardown(pTHX) /* Call only from PERL_SYS_TERM(). */
{
-
+ dVAR;
#ifdef DEBUGGING
{
/* By now all filehandles should have been closed, so any
}
}
-
-
/*--------------------------------------------------------------------------------------*/
/*
* Bottom-most level for UNIX-like case
(This is now used as a subroutine by C<sv_magic>.)
- MAGIC * sv_magicext(SV* sv, SV* obj, int how, MGVTBL *vtbl, const char* name, I32 namlen)
+ MAGIC * sv_magicext(SV* sv, SV* obj, int how, const MGVTBL *vtbl, const char* name, I32 namlen)
=for hackers
Found in file sv.c
PERL_CALLCONV void Perl_sv_magic(pTHX_ SV* sv, SV* obj, int how, const char* name, I32 namlen)
__attribute__nonnull__(pTHX_1);
-PERL_CALLCONV MAGIC * Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, MGVTBL *vtbl, const char* name, I32 namlen)
+PERL_CALLCONV MAGIC * Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtbl, const char* name, I32 namlen)
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV SV* Perl_sv_mortalcopy(pTHX_ SV* oldsv)
PERL_CALLCONV void Perl_my_clearenv(pTHX);
#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ const char *my_cxt_key, size_t size)
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV int Perl_my_cxt_index(pTHX_ const char *my_cxt_key)
+ __attribute__nonnull__(pTHX_1);
+
+#else
PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ int *index, size_t size)
__attribute__nonnull__(pTHX_1);
#endif
+#endif
#ifndef HAS_STRLCAT
PERL_CALLCONV Size_t Perl_my_strlcat(char *dst, const char *src, Size_t size);
=cut
*/
MAGIC *
-Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, MGVTBL *vtable,
+Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtable,
const char* name, I32 namlen)
{
dVAR;
else
mg->mg_ptr = (char *) name;
}
- mg->mg_virtual = vtable;
+ mg->mg_virtual = (MGVTBL *) vtable;
mg_magical(sv);
if (SvGMAGICAL(sv))
Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 namlen)
{
dVAR;
- MGVTBL *vtable;
+ const MGVTBL *vtable;
MAGIC* mg;
#ifdef PERL_OLD_COPY_ON_WRITE
ANY *
Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
{
+ dVAR;
ANY * const ss = proto_perl->Tsavestack;
const I32 max = proto_perl->Tsavestack_max;
I32 ix = proto_perl->Tsavestack_ix;
if (PL_my_cxt_size) {
Newx(PL_my_cxt_list, PL_my_cxt_size, void *);
Copy(proto_perl->Imy_cxt_list, PL_my_cxt_list, PL_my_cxt_size, void *);
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+ Newx(PL_my_cxt_keys, PL_my_cxt_size, char *);
+ Copy(proto_perl->Imy_cxt_keys, PL_my_cxt_keys, PL_my_cxt_size, char *);
+#endif
}
- else
+ else {
PL_my_cxt_list = (void**)NULL;
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+ PL_my_cxt_keys = (void**)NULL;
+#endif
+ }
PL_modglobal = hv_dup_inc(proto_perl->Imodglobal, param);
PL_custom_op_names = hv_dup_inc(proto_perl->Icustom_op_names,param);
PL_custom_op_descs = hv_dup_inc(proto_perl->Icustom_op_descs,param);
return KPerlAppUid;
}
-enum TPerlAppPanic
+enum TPerlAppPanic
{
EPerlAppCommandUnknown = 1
};
static TBool IsPerlModule(TParsePtrC aParsed)
{
- return aParsed.Ext().CompareF(_L(".pm")) == 0;
+ return aParsed.Ext().CompareF(_L(".pm")) == 0;
}
static TBool IsPerlScript(TParsePtrC aParsed)
{
- return aParsed.Ext().CompareF(_L(".pl")) == 0;
+ return aParsed.Ext().CompareF(_L(".pl")) == 0;
}
static void CopyFromInboxL(RFs aFs, const TFileName& aSrc, const TFileName& aDst)
isALPHA(aPeekBuffer[j])) {
while (j < n &&
isALNUM(aPeekBuffer[j]) &&
- i < m)
+ i < m)
aFn[i++] = aPeekBuffer[j++];
}
}
{
TFileName aDst;
TPtrC drive = aDrive.Drive();
- TPtrC namext = aFile.NameAndExt();
+ TPtrC namext = aFile.NameAndExt();
aDst.Format(_L("%S%S%S"), &drive, &KScriptPrefix, &namext);
if (!IsPerlScript(aDst) && !LooksLikePerlL(aPeekBuffer)) {
if (isModule)
message.Format(_L("Really run module %S?"), &aScriptName);
- else
+ else
message.Format(_L("Run %S?"), &aScriptName);
if (CPerlUi::YesNoDialogL(message))
DoRunScriptL(aScriptName);
#ifdef __SERIES60__
_LIT(prompt, "Oneliner:");
#endif /* #ifdef __SERIES60__ */
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
_LIT(prompt, "Code:"); // The title has "Oneliner" already.
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
CPerlAppAppUi* cAppUi =
static_cast<CPerlAppAppUi*>(CEikonEnv::Static()->EikAppUi());
if (CPerlUi::TextQueryDialogL(_L("Oneliner"),
CnvUtfConverter::ConvertFromUnicodeToUtf8(utf8,
cAppUi->iOneLiner);
CPerlBase* perl = CPerlBase::NewInterpreterLC();
- int argc = 3;
- char **argv = (char**) malloc(argc * sizeof(char *));
+#ifdef __SERIES90__
+ int argc = 5;
+#else
+ int argc = 3;
+#endif
+ char **argv = (char**) malloc(argc * sizeof(char *));
User::LeaveIfNull(argv);
TCleanupItem argvCleanupItem = TCleanupItem(free, argv);
CleanupStack::PushL(argvCleanupItem);
argv[0] = (char *) "perl";
argv[1] = (char *) "-le";
+#ifdef __SERIES90__
+ argv[2] = (char *) "unshift @INC, 'C:/Mydocs';";
+ argv[3] = (char *) "-e";
+ argv[4] = (char *) utf8.PtrZ();
+#else
argv[2] = (char *) utf8.PtrZ();
- perl->ParseAndRun(argc, argv);
+#endif
+ perl->ParseAndRun(argc, argv);
CleanupStack::PopAndDestroy(2, perl);
}
}
}
}
-CApaDocument* CPerlAppApplication::CreateDocumentL()
+CApaDocument* CPerlAppApplication::CreateDocumentL()
{
CPerlAppDocument* cDoc = new (ELeave) CPerlAppDocument(*this);
return cDoc;
#endif // #ifndef PerlAppMinimal
-EXPORT_C CApaApplication* NewApplication()
+EXPORT_C CApaApplication* NewApplication()
{
return new CPerlAppApplication;
}
class CPerlAppAppView : public CPerlUiAppView
{
public:
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
void HandleCommandL(TInt aCommand);
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
};
#endif // __PerlApp_h__
# endif
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
# include <eikon.hrh>
# include <cknflash.h>
# include <ckndgopn.h>
# include <ckndgfob.h>
# include <eiklabel.h>
# include <cknconf.h>
-#endif /* #ifdef __SERIES80__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
# include <qikon.hrh>
#include "PerlUi.hrh"
#include "PerlUi.rsg"
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
#include "Eikon.rsg"
-#endif /* #ifdef __SERIES80__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#include "EXTERN.h"
#include "perl.h"
dlg->SetTextL(aMessage);
return dlg->RunDlgLD() == EAknSoftkeyOk;
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
return CCknConfirmationDialog::RunDlgWithDefaultIconLD(aMessage, R_EIK_BUTTONS_CANCEL_OK);
-#endif /* #ifdef __SERIES80__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
CEikDialog* dlg = new (ELeave) CEikDialog();
return dlg->ExecuteLD(R_PERLUI_OK_CANCEL_DIALOG) == EEikBidOk;
dlg->SetTextL(aMessage);
return dlg->RunDlgLD() == EAknSoftkeyOk;
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
return CCknConfirmationDialog::RunDlgWithDefaultIconLD(aMessage, R_EIK_BUTTONS_NO_YES);
-#endif /* #ifdef __SERIES80__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
CEikDialog* dlg = new (ELeave) CEikDialog();
return dlg->ExecuteLD(R_PERLUI_YES_NO_DIALOG) == EEikBidOk;
CAknInformationNote* note = new (ELeave) CAknInformationNote;
note->ExecuteLD(aMessage);
#endif /* #ifdef __SERIES60__ */
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
CEikonEnv::Static()->InfoMsg(aMessage);
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
}
EXPORT_C TInt CPerlUi::WarningNoteL(TDesC& aMessage)
CAknWarningNote* note = new (ELeave) CAknWarningNote;
return note->ExecuteLD(aMessage);
#endif /* #ifdef __SERIES60__ */
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
CEikonEnv::Static()->AlertWin(aMessage);
return ETrue;
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
}
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
CPerlUiTextQueryDialog::CPerlUiTextQueryDialog(HBufC*& aBuffer) :
iData(aBuffer)
/* TODO: OfferKeyEventL() so that newline can be seen as 'OK'.
* Or a hotkey for the button? */
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
EXPORT_C TBool CPerlUi::TextQueryDialogL(const TDesC& aTitle, const TDesC& aPrompt, TDes& aData, const TInt aMaxLength)
{
dlg->SetMaxLength(aMaxLength);
return dlg->ExecuteLD(R_PERLUI_TEXT_QUERY_DIALOG);
#endif /* #ifdef __SERIES60__ */
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
HBufC* data = NULL;
CPerlUiTextQueryDialog* dlg =
new (ELeave) CPerlUiTextQueryDialog(data);
return ETrue;
}
return EFalse;
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
}
EXPORT_C TBool CPerlUi::FileQueryDialogL(TDes& aFilename)
return AknCommonDialogs::RunSelectDlgLD(aFilename,
R_PERLUI_FILE_SELECTION_DIALOG);
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
if (CCknOpenFileDialog::RunDlgLD(aFilename,
CCknFileListDialogBase::EShowAllDrives
|CCknFileListDialogBase::EShowSystemFilesAndFolders
CEikonEnv::Static()->InfoMsg(_L("File not found"));
}
return EFalse;
-#endif /* #ifdef __SERIES80__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
return EFalse; // No filesystem access in UIQ 2.x!
#endif /* #ifdef __UIQ__ */
#endif /* #ifdef __SERIES60__ */
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
EXPORT_C void CPerlUiAppView::HandleCommandL(TInt aCommand, CPerlUiAppUi* aAppUi) {
aAppUi->DoHandleCommandL(aCommand);
}
}
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
CPerlUiAppView* CPerlUiAppView::NewL(const TRect& aRect)
{
# include <akndoc.h>
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
# include <eikapp.h>
# include <eikappui.h>
# include <eikdoc.h>
# include <eikbctrl.h>
# include <eikgted.h>
# include <eikdialg.h>
-#endif /* #ifdef __SERIES60__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
# include <qikapplication.h>
# define CgPerlUiAppView CCoeControl
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
# define CgPerlUiDocument CEikDocument
# define CgPerlUiApplication CEikApplication
# define CgPerlUiAppUi CEikAppUi
# define CgPerlUiNoteDialog CCknFlashingDialog
# define CgPerlUiAppView CEikBorderedControl
-#endif /* #ifdef __SERIES60__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
# define CgPerlUiDocument CEikDocument
static CPerlUiAppView* NewLC(const TRect& aRect);
~CPerlUiAppView();
void Draw(const TRect& aRect) const;
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
IMPORT_C void HandleCommandL(TInt aCommand, CPerlUiAppUi* aAppUi);
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
private:
void ConstructL(const TRect& aRect);
};
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
class CPerlUiTextQueryDialog : public CEikDialog
{
TBool OkToExitL(TInt aKeycode);
};
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
class CPerlUi : public CgPerlUiAppUi
{
my $ARM = 'thumb'; # 'thumb', 'armv5'
my $S60SDK = $ENV{S60SDK}; # qw(1.2 2.0 2.1 2.6) (from sdk.pl)
my $S80SDK = $ENV{S80SDK}; # qw(2.0) (from sdk.pl)
+my $S90SDK = $ENV{S90SDK}; # qw(1.1) (from sdk.pl)
my $UIQSDK = $ENV{UIQSDK}; # qw(2.0 2.1) (from sdk.pl)
my $UREL = $ENV{UREL}; # from sdk.pl
die "$0: SDK not recognized\n"
if !defined($SYMBIAN_VERSION) ||
!defined($SDK_VERSION) ||
- (!defined($S60SDK) && !defined($S80SDK) && !defined($UIQSDK));
+ (!defined($S60SDK) && !defined($S80SDK) && !defined($S90SDK) && !defined($UIQSDK));
die "$0: does not know which Windows compiler to use\n"
unless defined $WIN;
print $fh "MACRO\t__SERIES80_1X__\n" if $S80SDK =~ /^1\./;
print $fh "MACRO\t__SERIES80_2X__\n" if $S80SDK =~ /^2\./;
}
+ if ($SDK_VARIANT eq 'S90') {
+ print $fh "MACRO\t__SERIES90__\n";
+ }
if ($SDK_VARIANT eq 'UIQ') {
print $fh "MACRO\t__UIQ__\n";
print $fh "MACRO\t__UIQ_1X__\n" if $UIQSDK =~ /^1\./;
@c = map { glob } qw(*.c); # Find the .c files.
@c = map { lc } @c; # Lowercase the names.
@c = grep { !/malloc\.c/ } @c; # Use the system malloc.
+ @c = grep { !/madly\.c/ } @c; # mad is undef.
@c = grep { !/main\.c/ } @c; # main.c must be explicit.
push @c, map { lc } @x;
@c = map { s:^\.\./::; $_ } @c; # Remove the leading ../
LIBRARY estor.lib
__EOF__
}
- if ($SDK_VARIANT =~ /^S[68]0$/) {
+ if ($SDK_VARIANT =~ /^S[689]0$/) {
print $fh <<__EOF__;
LIBRARY commonengine.lib
__EOF__
LIBRARY commondialogs.lib
__EOF__
}
- if (defined $S80SDK) {
+ if ((defined $S80SDK) or (defined $S90SDK)) {
print $fh <<__EOF__;
LIBRARY eikctl.lib
LIBRARY eikcoctl.lib
my ( $var, $val ) = ( $1, $2 );
$val =~ s/x.y.z/$R_V_SV/gi;
$val =~ s/thumb/$ARM/gi;
+ $val = "C:$val" if (defined($S90SDK) and ($val =~ /^(\/|\\\\)system[\/\\]/i));
$val = "'$SYMBIAN_VERSION'" if $var eq 'osvers';
$val = "'$SDK_VERSION'" if $var eq 'sdkvers';
$config{$var} = $val;
sub create_DynaLoader_cpp {
print "\text\\DynaLoader\\DynaLoader.cpp\n";
system(
-q[perl -Ilib lib\ExtUtils\xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp]
+q[xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp]
) == 0
or die "$0: creating DynaLoader.cpp failed: $!\n";
push @unclean, 'ext\DynaLoader\DynaLoader.cpp';
$S80SDK =~ /^(\d+)\.(\d+)$/;
($sdkmajor, $sdkminor) = ($1, $2);
}
+ if ($SDK_VARIANT eq 'S90') {
+ $S90SDK =~ /^(\d+)\.(\d+)$/;
+ ($sdkmajor, $sdkminor) = ($1, $2);
+ }
if ($SDK_VARIANT eq 'UIQ') {
$UIQSDK =~ /^(\d+)\.(\d+)$/;
($sdkmajor, $sdkminor) = ($1, $2);
sub create_perlmain_c {
print "\tperlmain.c\n";
system(
-q[perl -ne "print qq[ char *file = __FILE__;\n] if /dXSUB_SYS/;print;print qq[ newXS(\"DynaLoader::boot_DynaLoader\", boot_DynaLoader, file);\n] if /dXSUB_SYS/;print qq[EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);\n] if /Do not delete this line/" miniperlmain.c > perlmain.c]
+q[perl -ne "print qq[ char *file = __FILE__;\n] if /dXSUB_SYS/;print unless /PERL_UNUSED_CONTEXT/;print qq[ newXS(\"DynaLoader::boot_DynaLoader\", boot_DynaLoader, file);\n] if /dXSUB_SYS/;print qq[EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);\n] if /Do not delete this line/" miniperlmain.c > perlmain.c]
) == 0
or die "$0: Creating perlmain.c failed: $!\n";
push @unclean, 'perlmain.c';
qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] :
defined $S80SDK ?
qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] :
+ defined $S90SDK ?
+qq[;Supports Series 90 v1.1\n(0x101FBE05), 0, 0, 0, {"Series90ProductID"}\n] :
defined $UIQSDK && $SDK_VERSION =~ /^(\d)\.(\d)$/ ?
qq[;Supports UIQ v2.1\n(0x101F617B), $1, $2, 0, {"UIQ21ProductID"}\n] :
";Supports Series NN";
my $APPS = $UREL;
- if (($SDK_VARIANT eq 'S60' && $SDK_VERSION ne '1.2' || $WIN eq 'winscw') || defined $S80SDK) { # Do only if not in S60 1.2 VC.
+ if (($SDK_VARIANT eq 'S60' && $SDK_VERSION ne '1.2' || $WIN eq 'winscw') || defined $S80SDK || defined $S90SDK) { # Do only if not in S60 1.2 VC.
$APPS =~ s!\\epoc32\\release\\(.+)\\$UARM$!\\epoc32\\data\\z\\system\\apps\\PerlApp!i;
}
# TODO: in S60 3.0 there will be no more recognizers.
my $mdl = qq["$UREL\\PerlRecog.mdl"-"!:\\system\\recogs\\PerlRecog.mdl";];
- my $AIF = $SDK_VARIANT =~ /^S[68]0/ ? qq["$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"] : "";
+ my $AIF = $SDK_VARIANT =~ /^S[689]0/ ? qq["$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"] : "";
print PERLAPP_PKG <<__EOF__;
; !!!!!! DO NOT EDIT THIS FILE !!!!!!
; This file is built by symbian\\config.pl.
if ( open( DEMOS, "perl symbian\\demo_pl list |" ) ) {
while (<DEMOS>) {
chomp;
- print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n];
+ if (defined $S90SDK) {
+ print PERLAPP_PKG qq["$_"-"!:\\Mydocs\\Perl\\$_"\n];
+ } else {
+ print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n];
+ }
}
close(DEMOS);
}
LIBRARY ckndlg.lib
__EOF__
}
+ if (defined $S90SDK) {
+ push @MACRO, '__SERIES90__';
+ push @LIB, <<__EOF__;
+LIBRARY eikctl.lib
+LIBRARY eikcoctl.lib
+LIBRARY eikdlg.lib
+LIBRARY ckndlg.lib
+__EOF__
+ }
if (defined $UIQSDK) {
push @MACRO, '__UIQ__';
push @MACRO, '__UIQ_1X__' if $UIQSDK =~ /^1\./;
__EOF__
}
}
- if ($SDK_VARIANT =~ /^S[68]0$/) {
+ if ($SDK_VARIANT =~ /^S[689]0$/) {
print PERLAPP_MMP <<__EOF__;
AIF PerlApp.aif . PerlAppAif.rss
__EOF__
lib\\Config.pm:
copy symbian\\config.sh config.sh
+__EOF__
+ if (defined $S90SDK) {
+ print MAKEFILE <<__EOF__;
+ perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g; s!='(\\\\\\\\system)!='C:\\1!" config.sh
+__EOF__
+ } else {
+ print MAKEFILE <<__EOF__;
perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g" config.sh
+__EOF__
+ };
+ print MAKEFILE <<__EOF__;
perl \$(XLIB) configpm --cross=symbian
copy xlib\\symbian\\Config.pm lib\\Config.pm
perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" lib\\Config.pm
perl${VERSION}ext.sis perlext.sis: perldll_arm buildext_sis
perl symbian\\makesis.pl perl${VERSION}ext
-EXT = Compress::Zlib Cwd Data::Dumper Devel::Peek Digest::MD5 Errno Fcntl File::Glob Filter::Util::Call IO List::Util MIME::Base64 PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes XSLoader attrs
+EXT = Compress::Raw::Zlib Cwd Data::Dumper Devel::Peek Digest::MD5 Errno Fcntl File::Glob Filter::Util::Call IO List::Util MIME::Base64 PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes XSLoader attrs
buildext: perldll symbian\\xsbuild.pl lib\\Config.pm
perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) \$(EXT)
d_attribute_pure='undef'
d_attribute_unused='undef'
d_attribute_warn_unused_result='undef'
+d_builtin_expect='undef'
+d_builtin_choose_expr='undef'
d_bcmp='undef'
d_bcopy='undef'
d_bsd='undef'
use strict;
use Cwd;
my $CWD = getcwd();
-$CWD =~ s!^C:!!i;
+$CWD =~ s!^[a-z]:!!i;
$CWD =~ s!/!\\!g;
$CWD;
# Extensions.
#
ext attrs
-ext Compress/Zlib -zlib-src
+ext Compress/Raw/Zlib -zlib-src
ext Cwd
ext Data/Dumper
ext Devel/Peek
ext Digest/MD5
+ext Digest/SHA
ext Errno
ext Fcntl CONST
ext File/Glob CONST
ext Filter/Util/Call
+ext Hash/Util
ext IO
ext List/Util
+ext Math/BigInt/FastCalc
ext MIME/Base64
ext PerlIO/scalar
ext PerlIO/via
ext SDBM_File -sdbm/db?.c -sdbm/util.c
ext Socket CONST
ext Storable
+ext Text/Soundex
ext Time/HiRes CONST
+ext Time/Piece
ext XSLoader
# ext B ERROR
# ext ByteLoader byterun.c ERROR VERSION
# ext Encode nonconst Encode/encode.h def_t.c encengine.c
# ext I18N/Langinfo PORT
# ext IPC/SysV PORT
+# ext NDBM_File PORT
+# ext ODBM_File PORT
# ext Opcode ERROR
# ext PerlIO/encoding Encode
# ext POSIX CONST USELESS
# ext threads PORT
# ext threads/shared PORT
# ext Unicode/Normalize nonconst
+# ext Win32 USELESS
# ext XS/APItest USELESS
# ext XS/Typemap nonconst USELESS
my $ARM = 'thumb'; # TODO
my $S60SDK = $ENV{S60SDK}; # from sdk.pl
my $S80SDK = $ENV{S80SDK}; # from sdk.pl
+my $S90SDK = $ENV{S90SDK}; # from sdk.pl
my $UREL = $ENV{UREL}; # from sdk.pl
$UREL =~ s/-ARM-/$ARM/;
qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] :
defined $S80SDK ?
qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] :
+ defined $S90SDK ?
+qq[;Supports Series 90 v1.1\n(0x101FBE05), 0, 0, 0, {"Series90ProductID"}\n] :
";Supports Series NN";
open PKG, ">$pkg" or die "$0: failed to create $pkg: $!\n";
} elsif ($SDK_NAME =~ m!S80_DP2_0_SDK!) {
$SDK_VARIANT = 'S80';
$SDK_VERSION = $ENV{S80SDK} = '2.0';
+ } elsif ($SDK_NAME =~ m!Nokia_7710_SDK!) {
+ $SDK_VARIANT = 'S90';
+ $SDK_VERSION = $ENV{S90SDK} = '1.1';
}
} elsif ($ENV{PATH} =~ m!\\Symbian\\UIQ_(\d)(\d)\\Epoc32\\gcc\\bin!i) {
$SDK_NAME = 'UIQ';
if (open(GCC, "gcc -v 2>&1 |")) {
while (<GCC>) {
# print;
- if (/Reading specs from ((?:C:)?\\Symbian.+?)\\Epoc32\\/i) {
+ if (/Reading specs from (.+?)\\Epoc32\\/i) {
$SYMBIAN_ROOT = $1;
# The S60SDK tells the Series 60 SDK version.
if ($ENV{S60SDK}) {
$SymbianVersion =~ s:/:\\:g;
-die "$0: Symbian version '$SymbianVersion' not found\n"
- unless -d "\\Symbian\\$SymbianVersion";
+#die "$0: Symbian version '$SymbianVersion' not found\n"
+# unless -d "\\Symbian\\$SymbianVersion";
die "$0: Perl version undefined\n" unless defined $PerlVersion;
+$PERLSDK = "$SYMBIAN_ROOT\\Perl\\$PerlVersion";
+
die "$0: Perl version '$PerlVersion' not found\n"
- if !$CoreBuild && !-d "\\Symbian\\Perl\\$PerlVersion";
+ if !$CoreBuild && !-d $PERLSDK;
print "Configuring with Symbian $SymbianVersion and Perl $PerlVersion...\n";
-$PERLSDK = "\\Symbian\\Perl\\$PerlVersion";
-
$R_V_SV = $PerlVersion;
$VERSION = $PerlVersion unless defined $VERSION;
}
my $cmd;
if ($CoreBuild) {
+ $ENV{PERL_CORE} = 1;
# Problem: the Config.pm we have in $BUILDROOT\\lib carries the
# version number of the Perl we are building, while the Perl
# we are running might have some other version. Solution:
push @{ $CONF{MACRO} }, '__SERIES80__'
unless grep { $_ eq '__SERIES80__' } @{ $CONF{MACRO} };
}
+ if ($SDK_VARIANT eq 'S90') {
+ push @{ $CONF{MACRO} }, '__SERIES90__'
+ unless grep { $_ eq '__SERIES90__' } @{ $CONF{MACRO} };
+ }
if ($SDK_VARIANT eq 'UIQ') {
push @{ $CONF{MACRO} }, '__UIQ__'
unless grep { $_ eq '__UIQ__' } @{ $CONF{MACRO} };
}
}
if ( my @c = glob("*.c *.cpp */*.c */*.cpp") ) {
- @c = grep { ! m:^zlib-src/: } @c if $ext eq 'ext\Compress\Zlib';
+ @c = grep { ! m:^zlib-src/: } @c if $ext eq 'ext\Compress\Raw\Zlib';
for my $c (@c) {
$c =~ s:/:\\:g;
$src{$c}++;
}
}
if ( my @h = glob("*.h */*.h") ) {
- @h = grep { ! m:^zlib-src/: } @h if $ext eq 'ext\Compress\Zlib';
+ @h = grep { ! m:^zlib-src/: } @h if $ext eq 'ext\Compress\Raw\Zlib';
for my $h (@h) {
$h =~ s:/:\\:g;
$h = dirname($h);
sub update_cwd {
$CWD = getcwd();
- $CWD =~ s!^[CD]:!!i;
+ $CWD =~ s!^[A-Z]:!!i;
$CWD =~ s!/!\\!g;
}
or die "$0: make distclean failed\n";
}
}
- if ( $ext eq "ext\\Compress\\Zlib" ) {
+ if ( $ext eq "ext\\Compress\\Raw\\Zlib" ) {
my @bak;
find( sub { push @bak, $File::Find::name if /\.bak$/ }, "." );
unlink(@bak) if @bak;
#ifdef PERL_IMPLICIT_CONTEXT
-/* implements the MY_CXT_INIT macro. The first time a module is loaded,
+/* Implements the MY_CXT_INIT macro. The first time a module is loaded,
the global PL_my_cxt_index is incremented, and that value is assigned to
that module's static my_cxt_index (who's address is passed as an arg).
Then, for each interpreter this function is called for, it makes sure a
void* slot is available to hang the static data off, by allocating or
extending the interpreter's PL_my_cxt_list array */
+#ifndef PERL_GLOBAL_STRUCT_PRIVATE
void *
Perl_my_cxt_init(pTHX_ int *index, size_t size)
{
Zero(p, size, char);
return p;
}
-#endif
+
+#else /* #ifndef PERL_GLOBAL_STRUCT_PRIVATE */
+
+int
+Perl_my_cxt_index(pTHX_ const char *my_cxt_key)
+{
+ dVAR;
+ int index;
+
+ for (index = 0; index < PL_my_cxt_index; index++) {
+ const char *key = PL_my_cxt_keys[index];
+ /* try direct pointer compare first - there are chances to success,
+ * and it's much faster.
+ */
+ if ((key == my_cxt_key) || strEQ(key, my_cxt_key))
+ return index;
+ }
+ return -1;
+}
+
+void *
+Perl_my_cxt_init(pTHX_ const char *my_cxt_key, size_t size)
+{
+ dVAR;
+ void *p;
+ int index;
+
+ index = Perl_my_cxt_index(aTHX_ my_cxt_key);
+ if (index == -1) {
+ /* this module hasn't been allocated an index yet */
+ MUTEX_LOCK(&PL_my_ctx_mutex);
+ index = PL_my_cxt_index++;
+ MUTEX_UNLOCK(&PL_my_ctx_mutex);
+ }
+
+ /* make sure the array is big enough */
+ if (PL_my_cxt_size <= index) {
+ int old_size = PL_my_cxt_size;
+ int i;
+ if (PL_my_cxt_size) {
+ while (PL_my_cxt_size <= index)
+ PL_my_cxt_size *= 2;
+ Renew(PL_my_cxt_list, PL_my_cxt_size, void *);
+ Renew(PL_my_cxt_keys, PL_my_cxt_size, const char *);
+ }
+ else {
+ PL_my_cxt_size = 16;
+ Newx(PL_my_cxt_list, PL_my_cxt_size, void *);
+ Newx(PL_my_cxt_keys, PL_my_cxt_size, const char *);
+ }
+ for (i = old_size; i < PL_my_cxt_size; i++) {
+ PL_my_cxt_keys[i] = 0;
+ PL_my_cxt_list[i] = 0;
+ }
+ }
+ PL_my_cxt_keys[index] = my_cxt_key;
+ /* newSV() allocates one more than needed */
+ p = (void*)SvPVX(newSV(size-1));
+ PL_my_cxt_list[index] = p;
+ Zero(p, size, char);
+ return p;
+}
+#endif /* #ifndef PERL_GLOBAL_STRUCT_PRIVATE */
+#endif /* PERL_IMPLICIT_CONTEXT */
#ifndef HAS_STRLCAT
Size_t