github.com/hongwozai/go-src-1.4.3@v0.0.0-20191127132709-dc3fce3dbccb/misc/swig/callback/callback.cc (about)

     1  // Copyright 2013 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // This .cc file will be automatically compiled by the go tool and
     6  // included in the package.
     7  
     8  #include <string>
     9  #include "callback.h"
    10  
    11  std::string Caller::call() {
    12  	if (callback_ != 0)
    13  		return callback_->run();
    14  	return "";
    15  }