Add a 'flag_ptr' field to CommandLineFlagInfo that points to the current storage of the flag (i.e. &FLAGS_foo).

R=csilvers
DELTA=15  (15 added, 0 deleted, 0 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3301


git-svn-id: https://gflags.googlecode.com/svn/trunk@67 6586e3c6-dcc4-952a-343f-ff74eb82781d
diff --git a/src/gflags.cc b/src/gflags.cc
index 9b4d66c..ffb0955 100644
--- a/src/gflags.cc
+++ b/src/gflags.cc
@@ -497,6 +497,7 @@
   string default_value() const { return defvalue_->ToString(); }
   const char* type_name() const { return defvalue_->TypeName(); }
   ValidateFnProto validate_function() const { return validate_fn_proto_; }
+  const void* flag_ptr() const { return current_->value_buffer_; }
 
   void FillCommandLineFlagInfo(struct CommandLineFlagInfo* result);
 
@@ -581,6 +582,7 @@
   UpdateModifiedBit();
   result->is_default = !modified_;
   result->has_validator_fn = validate_function() != NULL;
+  result->flag_ptr = flag_ptr();
 }
 
 void CommandLineFlag::UpdateModifiedBit() {