diff options
author | panne <unknown> | 2000-04-20 16:28:39 +0000 |
---|---|---|
committer | panne <unknown> | 2000-04-20 16:28:39 +0000 |
commit | c5b20ebe40851da1bdff06a60ff1416a78f6bce5 (patch) | |
tree | ee16b63df5ecc4f95df7d91c8de902eb0b5c1eed | |
parent | d8c190623d1004e7ad84773fd2a90428ae1273f4 (diff) | |
download | haskell-c5b20ebe40851da1bdff06a60ff1416a78f6bce5.tar.gz |
[project @ 2000-04-20 16:28:39 by panne]
To avoid potential collisions between different modules, prefix the
names of the C stubs with the module name.
-rw-r--r-- | ghc/compiler/deSugar/DsForeign.lhs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/compiler/deSugar/DsForeign.lhs b/ghc/compiler/deSugar/DsForeign.lhs index 65d0607ed7..7817c5285b 100644 --- a/ghc/compiler/deSugar/DsForeign.lhs +++ b/ghc/compiler/deSugar/DsForeign.lhs @@ -332,7 +332,7 @@ dsFExportDynamic i ty mod_name ext_name cconv = newSysLocalDs ty `thenDs` \ fe_id -> let -- hack: need to get at the name of the C stub we're about to generate. - fe_nm = toCName fe_id + fe_nm = moduleUserString mod_name ++ "_" ++ toCName fe_id fe_ext_name = ExtName (_PK_ fe_nm) Nothing in dsFExport i export_ty mod_name fe_ext_name cconv True @@ -434,7 +434,7 @@ fexportEntry mod_nm c_nm helper args res_ty cc isDyn = (header_bits, c_bits) -- create the application + perform it. , text "rc=rts_evalIO" <> parens (foldl appArg (text "(StgClosure*)&" <> h_nm) (zip args c_args) <> comma <> text "&ret") <> semi - , text "rts_checkSchedStatus" <> parens (doubleQuotes (text mod_nm <> char '.' <> ptext c_nm) + , text "rts_checkSchedStatus" <> parens (doubleQuotes (ptext c_nm) <> comma <> text "rc") <> semi , text "return" <> return_what <> semi , rbrace |