From: Alexis Laferrière Date: Wed, 28 Jan 2015 14:40:10 +0000 (-0500) Subject: src: each platform has a name, except for the default X-Git-Tag: v0.7.1~3^2~4 X-Git-Url: http://nitlanguage.org src: each platform has a name, except for the default Signed-off-by: Alexis Laferrière --- 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