From f0cad55e168131ed13f9fb3cea8c41679bbbd9dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Wed, 28 Jan 2015 09:40:10 -0500 Subject: [PATCH] src: each platform has a name, except for the default MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- src/platform/android.nit | 2 ++ src/platform/emscripten.nit | 1 + src/platform/platform.nit | 4 ++++ src/platform/pnacl.nit | 2 ++ 4 files changed, 9 insertions(+) diff --git a/src/platform/android.nit b/src/platform/android.nit index 78ba820..98a017e 100644 --- a/src/platform/android.nit +++ b/src/platform/android.nit @@ -34,6 +34,8 @@ end class AndroidPlatform super Platform + redef fun name do return "android" + redef fun supports_libgc do return true redef fun supports_libunwind do return false diff --git a/src/platform/emscripten.nit b/src/platform/emscripten.nit index dc2662f..3e9199a 100644 --- a/src/platform/emscripten.nit +++ b/src/platform/emscripten.nit @@ -31,6 +31,7 @@ end class EmscriptenPlatform super Platform + redef fun name do return "emscripten" redef fun supports_libunwind do return false redef fun supports_libgc do return false redef fun supports_linker_script do return false diff --git a/src/platform/platform.nit b/src/platform/platform.nit index 5b7f7a5..40069c4 100644 --- a/src/platform/platform.nit +++ b/src/platform/platform.nit @@ -104,6 +104,10 @@ end # # Services will be added to this class in other modules. class Platform + + # Simple lower-case name of the platform + fun name: nullable String do return null + # Does the platform provide and support the library `unwind`? fun supports_libunwind: Bool do return true diff --git a/src/platform/pnacl.nit b/src/platform/pnacl.nit index 9fceaad..d7103db 100644 --- a/src/platform/pnacl.nit +++ b/src/platform/pnacl.nit @@ -31,6 +31,8 @@ end class PnaclPlatform super Platform + redef fun name do return "pnacl" + redef fun supports_libunwind do return false redef fun no_main do return true -- 1.7.9.5