Skip to content

Commit

Permalink
pass function attributes as uint
Browse files Browse the repository at this point in the history
  • Loading branch information
jll63 committed Jun 26, 2018
1 parent 990599f commit 0678c5d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/openmethods.d
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ mixin(registerMethods);
auto registerMethods(string moduleName = __MODULE__)
{
return `static import openmethods;
import std.traits : FunctionAttribute;
mixin(openmethods._registerMethods!(%s));
mixin openmethods._registerSpecs!(%s);`.format(moduleName, moduleName);
}
Expand Down Expand Up @@ -554,14 +553,14 @@ template castArgs(T...)
immutable MptrInDeallocator = "deallocator";
immutable MptrViaHash = "hash";

struct Method(string Mptr, R, string id, FunctionAttribute functionAttributes_, T...)
struct Method(string Mptr, R, string id, uint functionAttributes_, T...)
{
alias QualParams = T;
alias Params = CallParams!T;
alias ReturnType = R;
alias Word = Runtime.Word;
enum name = id;
alias functionAttributes = functionAttributes_;
enum functionAttributes = cast(FunctionAttribute) functionAttributes_;
alias This = Method!(Mptr, R, id, functionAttributes, T);

static if (functionAttributes & FunctionAttribute.ref_) {
Expand Down

0 comments on commit 0678c5d

Please sign in to comment.