diff --git a/port/linux/version_config.py b/port/linux/version_config.py index d45620dbf..4c20ddff6 100644 --- a/port/linux/version_config.py +++ b/port/linux/version_config.py @@ -1,3 +1,3 @@ MajorVersion = "1" MinorVersion = "10" -MicroVersion = "5" +MicroVersion = "6" diff --git a/src/PikaVersion.h b/src/PikaVersion.h index ab2bdb259..506a70601 100644 --- a/src/PikaVersion.h +++ b/src/PikaVersion.h @@ -1,5 +1,5 @@ #define PIKA_VERSION_MAJOR 1 #define PIKA_VERSION_MINOR 10 -#define PIKA_VERSION_MICRO 5 +#define PIKA_VERSION_MICRO 6 -#define PIKA_EDIT_TIME "2022/08/29 18:54:14" +#define PIKA_EDIT_TIME "2022/08/30 18:40:40" diff --git a/tools/pikaCompiler/rust-msc-latest-win10.exe b/tools/pikaCompiler/rust-msc-latest-win10.exe index c6f44a1ce..f0767ded1 100644 Binary files a/tools/pikaCompiler/rust-msc-latest-win10.exe and b/tools/pikaCompiler/rust-msc-latest-win10.exe differ diff --git a/tools/pikaCompiler/src/class_info.rs b/tools/pikaCompiler/src/class_info.rs index 46a07473c..b0666b907 100644 --- a/tools/pikaCompiler/src/class_info.rs +++ b/tools/pikaCompiler/src/class_info.rs @@ -8,6 +8,7 @@ use crate::version_info::VersionInfo; use std::collections::BTreeMap; #[derive(Debug)] pub struct ClassInfo { + pub this_file_name: String, pub this_class_name: String, pub this_class_name_without_file: String, pub super_class_name: String, @@ -58,6 +59,7 @@ impl ClassInfo { let this_class_name_without_file = this_calss_name.clone(); this_calss_name = ClassInfo::add_file_profix(&file_name, &this_calss_name, is_package); let new_class_info = ClassInfo { + this_file_name: file_name.clone(), this_class_name: this_calss_name, this_class_name_without_file: this_class_name_without_file, super_class_name: super_class_name, diff --git a/tools/pikaCompiler/src/entry.rs b/tools/pikaCompiler/src/entry.rs index 6a18c2692..d4944d911 100644 --- a/tools/pikaCompiler/src/entry.rs +++ b/tools/pikaCompiler/src/entry.rs @@ -75,13 +75,24 @@ pub fn pika_compiler_entry() { f.write("\n".as_bytes()).unwrap(); for (_, class_info) in compiler.class_list.iter() { + /* get module_name */ + let mut module_name = class_info.this_file_name.clone(); + if module_name == "" { + module_name = class_info.this_class_name.clone(); + } + /* create module control macro */ + let module_define = format!( + "#ifndef PIKA_MODULE_{}_DISABLE\n", + module_name.to_ascii_uppercase() + ); + f.write(module_define.as_bytes()).unwrap(); /* create method api function */ f.write(class_info.method_api_fn().as_bytes()).unwrap(); /* create new classs function */ f.write(class_info.new_class_fn().as_bytes()).unwrap(); - f.write("\n".as_bytes()).unwrap(); /* create contruactor */ if !class_info.is_package { + f.write("\n".as_bytes()).unwrap(); let name = String::from(class_info.this_class_name.to_string()); f.write(format!("Arg *{}(PikaObj *self){{\n", &name).as_bytes()) .unwrap(); @@ -89,6 +100,8 @@ pub fn pika_compiler_entry() { .unwrap(); f.write("}\n".as_bytes()).unwrap(); } + f.write("#endif\n".as_bytes()).unwrap(); + f.write("\n".as_bytes()).unwrap(); } /* make the .h file for each python class */