Пример #1
0
bool apply_add(struct le *le, void *arg)
{
    struct tcuplinks *ups = arg;
    one_add(ups, le->data);
     
    return false;
}
Пример #2
0
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
#include "one_api.h"
#include "two_api.h"

#include <jni.h>

jint
Java_com_example_twolibs_TwoLibs_add( JNIEnv*  env,
                                      jobject  this,
                                      jint     x,
                                      jint     y )
{
	int temp1 = 0, temp2 = 0;
	temp1 = one_add(x, y);
	temp2 = two_add(x*2, y*2);

	return temp1 + temp2;

    // return first(x, y);
}