Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
iainchen committed Aug 17, 2023
1 parent 67ff0e6 commit dc645ba
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
2 changes: 1 addition & 1 deletion MangoFix.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MangoFix"
s.version = "1.5.4"
s.version = "1.5.5"
s.summary = "MangoFix"
s.description = <<-DESC
Mango is a DSL which syntax is very similar to Objective-C,Mango is also an iOS App hotfix SDK. You can use Mango method replace any Objective-C method.
Expand Down
31 changes: 30 additions & 1 deletion MangoFix/Execute/RunEnv/MFValue.m
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,36 @@ - (int64_t)c2integerValue{


- (double)c2doubleValue{
return [self c2uintValue];
if (self.externNativeGlobalVariable) {
if (self.externNativeGlobalVariablePointer) {
switch (_type.typeKind) {
case MF_TYPE_BOOL:
return *(BOOL *)self.externNativeGlobalVariablePointer;
case MF_TYPE_INT:
return *(NSInteger *)self.externNativeGlobalVariablePointer;
case MF_TYPE_U_INT:
return *(NSUInteger *)self.externNativeGlobalVariablePointer;
case MF_TYPE_DOUBLE:
return *(double *)self.externNativeGlobalVariablePointer;
default:
return 0;
}
}
return 0;
}

switch (_type.typeKind) {
case MF_TYPE_BOOL:
return _uintValue;
case MF_TYPE_INT:
return _integerValue;
case MF_TYPE_U_INT:
return _uintValue;
case MF_TYPE_DOUBLE:
return _doubleValue;
default:
return 0;
}
}


Expand Down
4 changes: 2 additions & 2 deletions MangoFixDemo/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# platform :ios, '8.0'

target 'MangoFixDemo' do
pod 'MangoFix', :path => '../'
# pod 'MangoFix'
pod 'MangoFix', :path => '../'
#pod 'MangoFix'
pod 'Masonry'
end

10 changes: 5 additions & 5 deletions MangoFixDemo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PODS:
- MangoFix (1.5.2):
- MangoFix (1.5.5):
- symdl
- Masonry (1.1.0)
- symdl (0.9.0)
- symdl (0.11.0)

DEPENDENCIES:
- MangoFix (from `../`)
Expand All @@ -18,10 +18,10 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
MangoFix: 8dbc1ff99d215152aeb29673f4e0f4444fa5024d
MangoFix: d8fc8e197188600e4eff6ad8a6fae8117eec390f
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
symdl: b199c582777d9abb0dc324c308f358502ca2c190
symdl: 964dc68858268eda431300463e8a634a745910f1

PODFILE CHECKSUM: 911a1bb3fd9799c1577d16ea8d90314d90fb35f1
PODFILE CHECKSUM: 489229be0c477f3b25df671aa34ff5c579e6523a

COCOAPODS: 1.12.1

0 comments on commit dc645ba

Please sign in to comment.