math
@@ -129,7 +129,7 @@ | ||
129 | 129 | |
130 | 130 | -rm -rf image/++PREFIX++/include/gt |
131 | 131 | -rm -rf image/++PREFIX++/include/ts |
132 | - -rm -rf image/++PREFIX++/include/mth | |
132 | +# -rm -rf image/++PREFIX++/include/mth | |
133 | 133 | -rm -rf image/++PREFIX++/include/_ts |
134 | 134 | -rm -rf image/++PREFIX++/include/std |
135 | 135 |
@@ -138,7 +138,7 @@ | ||
138 | 138 | |
139 | 139 | cp -rfp ${SRC}/h/gtt image/++PREFIX++/include/gtt |
140 | 140 | cp -rfp ${SRC}/h/gt image/++PREFIX++/include/gt |
141 | - cp -rfp ${SRC}/h/mth image/++PREFIX++/include/mth | |
141 | +# cp -rfp ${SRC}/h/mth image/++PREFIX++/include/mth | |
142 | 142 | cp -rfp ${SRC}/h/ts/* image/++PREFIX++/include/ts |
143 | 143 | cp -rfp ${SRC}/h/_ts image/++PREFIX++/include/_ts |
144 | 144 |
@@ -1,39 +0,0 @@ | ||
1 | - | |
2 | -#ifndef ___mObject_cpp_H___ | |
3 | -#define ___mObject_cpp_H___ | |
4 | - | |
5 | -#include "std/includes.h" | |
6 | -#include "ts/c++/pObject.h" | |
7 | - | |
8 | - | |
9 | -#define __mOP1(__op) \ | |
10 | - static float __op(float inp) {return ::__op##f(inp);}; \ | |
11 | - static double __op(double inp) {return ::__op(inp);}; \ | |
12 | - static long double __op(long double inp) {return ::__op##l(inp);}; | |
13 | - | |
14 | -#define mSqrt mObject::sqrt | |
15 | -#define mSin mObject::sin | |
16 | -#define mCos mObject::cos | |
17 | -#define mTan mObject::tan | |
18 | -#define mAtan mObject::atan | |
19 | -#define mAcos mObject::acos | |
20 | -#define mAsin mObject::asin | |
21 | -#define mExp mObject::exp | |
22 | -#define mLog mObject::log | |
23 | -#define mFabs mObject::fabs | |
24 | - | |
25 | -class mObject : public pObject { | |
26 | -public: | |
27 | - __mOP1(sqrt) | |
28 | - __mOP1(sin) | |
29 | - __mOP1(cos) | |
30 | - __mOP1(tan) | |
31 | - __mOP1(atan) | |
32 | - __mOP1(acos) | |
33 | - __mOP1(asin) | |
34 | - __mOP1(exp) | |
35 | - __mOP1(log) | |
36 | - __mOP1(fabs) | |
37 | -}; | |
38 | - | |
39 | -#endif |
@@ -13,12 +13,12 @@ | ||
13 | 13 | ptr = 0; |
14 | 14 | } |
15 | 15 | sPtr(__TYPE * org,int mutex_flag=0) { |
16 | - _replace(org); | |
16 | + _initial(org); | |
17 | 17 | if ( mutex_flag ) |
18 | 18 | stdObject::refUnlock(); |
19 | 19 | } |
20 | 20 | sPtr(const sPtr & inp) { |
21 | - replace(inp.ptr); | |
21 | + _initial(inp.ptr); | |
22 | 22 | } |
23 | 23 | ~sPtr() { |
24 | 24 | replace(0); |
@@ -66,6 +66,11 @@ | ||
66 | 66 | if ( ptr ) |
67 | 67 | ptr->addref(); |
68 | 68 | } |
69 | + void _initial(__TYPE * inp) { | |
70 | + ptr = inp; | |
71 | + if ( ptr ) | |
72 | + ptr->addref(); | |
73 | + } | |
69 | 74 | void replace(__TYPE * inp) { |
70 | 75 | stdObject::refLock(); |
71 | 76 | _replace(inp); |