< prev index next >
src/java.desktop/unix/native/libawt_xawt/awt/swing_GTKEngine.c
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 26,36 ****
#include <stdlib.h>
#include "gtk_interface.h"
#include "com_sun_java_swing_plaf_gtk_GTKEngine.h"
/* Static buffer for conversion from java.lang.String to UTF-8 */
! static char conversionBuffer[CONV_BUFFER_SIZE];
const char *getStrFor(JNIEnv *env, jstring val)
{
int length = (*env)->GetStringLength(env, val);
if (length > CONV_BUFFER_SIZE-1)
--- 26,36 ----
#include <stdlib.h>
#include "gtk_interface.h"
#include "com_sun_java_swing_plaf_gtk_GTKEngine.h"
/* Static buffer for conversion from java.lang.String to UTF-8 */
! static char conversionBuffer[(CONV_BUFFER_SIZE - 1) * 3 + 1];
const char *getStrFor(JNIEnv *env, jstring val)
{
int length = (*env)->GetStringLength(env, val);
if (length > CONV_BUFFER_SIZE-1)
< prev index next >