Skip to content
This repository has been archived by the owner on Aug 28, 2018. It is now read-only.

Commit

Permalink
update RTMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleepwalking committed Apr 16, 2014
1 parent 6b4ccb6 commit fabb157
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions src/Core/MacroUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
//Expand
#define _E(...) __VA_ARGS__

//Delay
#define __none()
#define _D(...) __VA_ARGS__ __none()

//String
#define _S(a) __S(a)
#define __S(a) #a
Expand Down
4 changes: 2 additions & 2 deletions src/Core/OO.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ void __RDelete(void* a, ...);
}

#define RTMethod(Ret, Name, Method, ...) \
Ret _C(_RTClassName, _, Method) \
(_RTClassName* This, ##__VA_ARGS__)
Ret _C(Name, _, __Attr, _, Method) \
(_C(Name, _, __Attr)* This, ##__VA_ARGS__)

#define RTFunc(Ret, Method, ...) \
Ret _C(Method, _, __Attr) \
Expand Down
9 changes: 9 additions & 0 deletions src/Include/RUtil2.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,12 @@
#include <RUtil2/IO/WaveFile.h>
#include <RUtil2/Core/OO.h>

//Default
#define PMatch PMatch_Double_Double
#define PMatch_Ctor PMatch_Double_Double_Ctor
#define PMatch_Dtor PMatch_Double_Double_Dtor
#define PMatch_AddPair PMatch_Double_Double_AddPair
#define PMatch_Clear PMatch_Double_Double_Clear
#define PMatch_Print PMatch_Double_Double_Print
#define PMatch_Query PMatch_Double_Double_Query

9 changes: 0 additions & 9 deletions src/Structure/PMatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,5 @@
#define _T2 Double
#include "../Core/RTemplate.h"

//Default
#define PMatch PMatch_Double_Double
#define PMatch_Ctor PMatch_Double_Double_Ctor
#define PMatch_Dtor PMatch_Double_Double_Dtor
#define PMatch_AddPair PMatch_Double_Double_AddPair
#define PMatch_Clear PMatch_Double_Double_Clear
#define PMatch_Print PMatch_Double_Double_Print
#define PMatch_Query PMatch_Double_Double_Query

#endif

2 changes: 1 addition & 1 deletion src/Structure/_PMatch.rc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RCtor(_RTClassName)
RDtor(_RTClassName)
{
Array_Dtor(_T1, This -> X);
Array_Dtor(_T2, This -> Y);
Array_Dtor(_T2, This -> Y);
}

RTMethod(void, PMatch, AddPair, _T1 XVar, _T2 YVar)
Expand Down

0 comments on commit fabb157

Please sign in to comment.