Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename modules os to cm_os and std to cm_std #375

Merged
merged 3 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions c/embeddedjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ static JSValue xplatformGetpid(JSContext *ctx, JSValueConst this_val,


static char fileCopyASCII[9] = {0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x00 };
static char fileCopyConvertedASCII[18] = {0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79,
static char fileCopyConvertedASCII[18] = {0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79,
0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x00 };
static char dirnameASCII[8] = {0x64, 0x69, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x00 };
static char stringFromBytesASCII[16] = {0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x00 };
Expand Down Expand Up @@ -1136,8 +1136,10 @@ static int js_experiment_init(JSContext *ctx, JSModuleDef *m)

static char asciiSTD[4] ={ 0x73, 0x74, 0x64, 0};
static char asciiOS[3] ={ 0x6F, 0x73, 0};
static char asciiExperiment[11] ={ 0x65, 0x78, 0x70, 0x65,
0x72, 0x69, 0x6d, 0x65,
static char asciiCM_STD[7] = { 0x63, 0x6d, 0x5f, 0x73, 0x74, 0x64, 0 };
static char asciiCM_OS[6] = { 0x63, 0x6d, 0x5f, 0x6f, 0x73, 0 };
static char asciiExperiment[11] ={ 0x65, 0x78, 0x70, 0x65,
0x72, 0x69, 0x6d, 0x65,
0x6e, 0x74, 0};
static char asciiZOS[4] = { 0x7a, 0x6F, 0x73, 0};
static char asciiNet[4] = { 0x6e, 0x65, 0x74, 0};
Expand Down Expand Up @@ -1439,8 +1441,14 @@ static JSContext *makeEmbeddedJSContext(JSRuntime *rt){
static void initContextModules(JSContext *ctx, EJSNativeModule **nativeModules, int nativeModuleCount){
/* system modules */
/* printf("before init std\n");*/

// TODO: remove next major release, deprecated module std, it is replaced by cm_std
js_init_module_std(ctx, asciiSTD);
// TODO: remove next major release, deprecated module os, it is replaced by cm_os
js_init_module_os(ctx, asciiOS);

js_init_module_std(ctx, asciiCM_STD);
js_init_module_os(ctx, asciiCM_OS);
js_init_module_experiment(ctx, asciiExperiment);
ejsInitModuleZOS(ctx, asciiZOS);
ejsInitModuleNet(ctx, asciiNet);
Expand Down
1 change: 0 additions & 1 deletion tests/js/config1.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as os from 'os';
import { ConfigManager } from "Configuration";

console.log("hello ConfigMgr, args were ["+scriptArgs+"]");
Expand Down
2 changes: 0 additions & 2 deletions tests/js/net1.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import * as zos from 'zos';
import * as os from 'os';
import * as net from 'net';

/*
Expand Down
1 change: 0 additions & 1 deletion tests/js/zos1.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as zos from 'zos';
import * as os from 'os';

var test1 = function(filename){
let zstats = zos.zstat(filename);
Expand Down